-
-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BloomTokenLog
#2136
base: main
Are you sure you want to change the base?
Add BloomTokenLog
#2136
Conversation
f96e7c5
to
9d19830
Compare
- Adds default feature dependency on `fastbloom` crate. - It enables a new BloomTokenLog implementation of TokenLog.
9d19830
to
0b4e414
Compare
Unless the fastbloom feature is disabled, in which case it still falls back to NoneTokenLog.
It makes sense to do this now that we have a default token log that's actually able to accept tokens.
Tests no longer reconfigure config to use SimpleTokenLog if the fastbloom feature is enabled, instead preferring to use the default BloomTokenLog.
0b4e414
to
d855d1f
Compare
.validation_token | ||
.sent(2) | ||
.log(Arc::new(SimpleTokenLog::default())); | ||
if cfg!(feature = "fastbloom") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, I need to invert this.
@djc and @Ralith, some meta-discussion I'd like to explicitly invite, and this applies to #2137 as well: It may be worth evaluating whether we want to go this route in the first place (of adding these defaults). It's possible we decide we want to go a different route. Some alternatives could include:
Points in favor of merging these PRs:
Points against merging these PRs:
I think it's worth putting these in here, but I'd like to hear what you think. |
fastbloom
BloomTokenLog
, a newTokenLog
implementation:fastbloom
crate is a popular bloom filter implementation with SIMD acceleration.