fix(starfish): transaction eviction stalls during fast commit sync#11247
Open
polinikita wants to merge 1 commit intodevelopfrom
Open
fix(starfish): transaction eviction stalls during fast commit sync#11247polinikita wants to merge 1 commit intodevelopfrom
polinikita wants to merge 1 commit intodevelopfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 6 Skipped Deployments
|
1677177 to
a2bf5b1
Compare
During fast sync, evict_transactions() and evict_tx_ref_to_block_digests() were bottlenecked by calculate_authority_eviction_round(), which depends on recent_headers_refs_by_authority. Fast sync adds only transactions and commits — no headers — so the header-based eviction round stays near GENESIS_ROUND, and the min() picks this stale value, preventing meaningful eviction. Transactions accumulated unboundedly in memory. When fast_sync_ongoing is true, use the commit-based GC round directly for transaction eviction, bypassing the header-based cap. Also remove the early return in flush() so eviction runs even when write buffers are empty (needed when last_solid_subdag_base is updated between flushes). Fixes #11246
a2bf5b1 to
cb3a289
Compare
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.
Description of change
During fast commit sync,
evict_transactions()was bottlenecked bycalculate_authority_eviction_round(), which depends onrecent_headers_refs_by_authority. Fast sync adds only transactions and commits — no headers — so the header-based eviction round stays near a lower value from which fast sync was started, and themin()picks this stale value. Transactions accumulated unboundedly in memory until reinitialization.Two fixes:
fast_sync_ongoingis true, bypass the header-based cap inevict_transactions()andevict_tx_ref_to_block_digests()— use the commit-based GC round directly. Normal operation keeps current semantics.flush()so eviction runs even when write buffers are empty (needed whenlast_solid_subdag_baseis updated between flushes).Links to any relevant issues
Fixes #11246
How the change has been tested