Restore Universal compaction for consensus BLOCKS_CF on mainnet#26184
Open
mystenmark wants to merge 1 commit intomainfrom
Open
Restore Universal compaction for consensus BLOCKS_CF on mainnet#26184mystenmark wants to merge 1 commit intomainfrom
mystenmark wants to merge 1 commit intomainfrom
Conversation
#26010 accidentally changed the compaction strategy for the BLOCKS_CF column family on mainnet. The old code used optimize_for_write_throughput_no_deletion() (Universal compaction, L0 trigger=80) for BLOCKS_CF, while other CFs used optimize_for_write_throughput() (Level compaction, L0 trigger=4). When #26010 introduced FIFO compaction gated behind use_fifo_compaction && chain != Mainnet, it removed optimize_for_write_throughput_no_deletion() and replaced it with optimize_for_no_deletion() (FIFO). On mainnet where FIFO is disabled, ALL CFs including BLOCKS_CF fell through to optimize_for_write_throughput() (Level compaction, L0 trigger=4). Opening an existing consensus DB (created with Universal compaction) under Level compaction with a much lower L0 trigger causes a compaction storm that can block consensus startup indefinitely. This prevents ConsensusAuthority::start() from completing, which blocks the TransactionClient from being set, stalling the entire validator. Fix: restore optimize_for_write_throughput_no_deletion() with Universal compaction and use it for BLOCKS_CF in the non-FIFO path, matching the pre-#26010 behavior.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
mwtian
approved these changes
Apr 9, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
optimize_for_write_throughput()(Level compaction, L0 trigger=4) instead of the originaloptimize_for_write_throughput_no_deletion()(Universal compaction, L0 trigger=80).optimize_for_write_throughput_no_deletion()function (byte-for-byte identical to pre-[consensus] use FIFO compaction outside of mainnet #26010) and uses it for BLOCKS_CF in the non-FIFO path.Test plan
🤖 Generated with Claude Code