Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add prefix bloom filter support #151

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

Closed
zaidoon1 wants to merge 2 commits into fjall-rs:3.0.0 from zaidoon1:prefix-bloom-3.0.0

Conversation

@zaidoon1
Copy link
Contributor

@zaidoon1 zaidoon1 commented Sep 1, 2025
edited
Loading

resolve #97

Copy link
Contributor Author

@marvin-j97 just want to make sure, did you want me to address the linter failures? they seem to be related to existing code

Copy link
Contributor

marvin-j97 commented Sep 11, 2025
edited
Loading

@marvin-j97 just want to make sure, did you want me to address the linter failures? they seem to be related to existing code

Linting seems to work now on the 3.0.0 branch, if you resolve the merge conflicts and pull, it should be fine.

Copy link
Contributor Author

hmm: help: use'_for type paths | 298 | pub(crate) fn get_binary_index_reader(&self) -> BinaryIndexReader<'_> { | ++++

hmm clippy is still not happy but i haven't changed this stuff? am i basing this off the right branch?

Copy link
Contributor

hmm: help: use'_for type paths | 298 | pub(crate) fn get_binary_index_reader(&self) -> BinaryIndexReader<'_> { | ++++

hmm clippy is still not happy but i haven't changed this stuff? am i basing this off the right branch?

That's just a warning though, right? I haven't really gotten to running clippy lints over the entire code base, so there are a lot of warnings as of now.

Copy link
Contributor Author

going to take a closer look, also noticed some api's have changed so my tests are failing now, i'll fix that and test locally before pushing

@zaidoon1 zaidoon1 force-pushed the prefix-bloom-3.0.0 branch 2 times, most recently from 5c502c3 to 7f70eeb Compare September 11, 2025 18:36
Copy link
Contributor Author

ok it was my fault, it was hidden with the other clippy warnings

@zaidoon1 zaidoon1 force-pushed the prefix-bloom-3.0.0 branch 3 times, most recently from 9a4719b to 5e53adb Compare September 13, 2025 08:06
@zaidoon1 zaidoon1 force-pushed the prefix-bloom-3.0.0 branch 2 times, most recently from 18921a8 to 768055f Compare September 13, 2025 18:38
Copy link
Contributor Author

did i break the build and test lsm example build or some other isssue?

Copy link
Contributor

marvin-j97 commented Sep 14, 2025
edited
Loading

did i break the build and test lsm example build or some other isssue?

The CI examples script does not support raw .rs files in the examples/ folder, so it crashes.

zaidoon1 reacted with thumbs up emoji

Copy link
Contributor Author

did i break the build and test lsm example build or some other isssue?

The CI examples script does not support raw .rs files in the examples/ folder, so it crashes.

should be fixed now, thanks!

Comment on lines +67 to +68
/// Returns a unique name for this prefix extractor.
fn name(&self) -> &str;
Copy link
Contributor

@marvin-j97 marvin-j97 Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking how to make use of this.
I guess this should be stored in each keyspace's config (in fjall) to check that the given prefix extractor matches the one that was initially configured.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, I may need to do more work but in rocksdb, if you want to change your prefix extractor then you need to use a different name which would cause rocksdb to ignore the old bloom that was used for the existing files

Copy link
Contributor

@marvin-j97 marvin-j97 Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then maybe the prefix extractor name also needs to be stored in every table's properties.

Copy link
Contributor Author

@zaidoon1 zaidoon1 Sep 19, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed a commit to do this and match rocksdb's behaviour:

"If prefix extractor changes when DB restarts, some SST files may contain prefix bloom filters generated using different prefix extractor than the one in current options. When opening those files, RocksDB will compare prefix extractor name stored in the properties of the SST files. If the name is different from the prefix extractor provided in the options, the prefix bloom filter is not used for this file"

one thing is how does fjall handle options that can be dynamically changeable vs can't be changed without a db restart? I don't think we would want a user to be able to change a prefix extractor on the fly

Copy link
Contributor

@marvin-j97 marvin-j97 Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the configuration cannot be changed during runtime. However I don't think it would be a problem, because tables that use the old prefix extractor would continue using that, and otherwise the filter is skipped. But that's probably an edge case and just shouldn't be allowed.

zaidoon1 reacted with thumbs up emoji
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok cool, so then what I have here should be good.

Copy link
Contributor

I deleted the 3.0.0 branch, so this needs to rebased on main now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@marvin-j97 marvin-j97 marvin-j97 requested changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /