-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Introduce experimental FIFO compaction settings for shreds in blockstore #22140
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Out of curiosity, any potential issues if a validator opens a ledger in one compaction type, then shuts down and opens the ledger with the other compaction type? i.e. are they always locked into path after making a decision?
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.
Good question. It's actually covered in the proposal #21358.
From Level to FIFO is simple, because every single file under Level compaction has a disjoint key range, which makes it a valid FIFO format.
From FIFO to Level, the DB will hit the write stall immediately because there are too many L0 files. Typically running manual compaction first before opening the DB is suggested.
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.
Would like to test that forward migration path from Level to FIFO just to ensure it doesn't stall. For instance run a validator for a while with level, then switch it to FIFO. Ideally on a couple of different nodes, a couple different times make sure they don't stall.
Second rollback case is a bit tricky, I think we need to think about how to expose the details of that second case to operators.
Is there a way to tell that the db was formerly opened in FIFO and is now switching to level so we can notify the operator they should perform manual compaction?
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.
I remember RocksDB itself does not store its options. The usual way to do it is to store the options inside an options file https://github.com/facebook/rocksdb/wiki/RocksDB-Options-File. Eventually, we might want to use RocksDB-Options-file to manage RocksDB options.
For the FIFO change, what we can do is to first have the FIFO code landed, then another PR to make it configurable via the command line arguments. Then we stay at this point for a while to make sure we will never revert back to a release where we cannot configure whether we want to use FIFO or Level. Once we reach that point, we can safely assume even when we roll back. The validator will still understand the command line argument and correctly use FIFO or Level after the revert.