[performance] cp commitment rebuild relevant PRs#21095
Merged
AskAlexSharov merged 3 commits intoMay 11, 2026
Merged
Conversation
…#20939) - `--resume` already supported with history commitment rebuild
…g retire (#21023) ## Summary - In `seg retire`, `BuildFiles` can leave background build/merge goroutines running. If `MergeLoop` runs while one of those is still in flight, its `mergingFiles` CAS loses to the background merge and `MergeLoop` returns immediately without doing anything. - The next MergeLoop is typically skipped because an earlier one is running. And so the whole merge logic was being skipped. - Drain background work via `agg.WaitForFiles()` between `BuildFiles`/prune and `MergeLoop` so the merge step actually runs. ## Test plan - [ ] `make lint` passes - [ ] `make erigon` builds - [ ] Run `erigon seg retire` on a datadir where background build/merge is active and confirm `MergeLoop` performs merges (previously a no-op)
## Summary - Filter `.kv` files before slicing in `CheckCommitmentRoot`, so `onlyCheckLastFile` picks the latest `.kv` instead of whatever `aggTx.Files` returned last (which was often the `.ef`). - Default `CHECK_COMMITMENT_ROOT_ONLY_LAST_FILE` and `CHECK_COMMITMENT_ROOT_ONLY_LAST_FILE_RECOMPUTE` to `false` so the check now covers all `.kv` files by default. - Add a discovery log line and a clearer warning when no `.kv` files are present. - with #21026 -- recompute check works fine now; and it is fast enough to do for all kv files ## Test plan - [ ] `make lint` - [ ] `make erigon integration` - [ ] Run `erigon seg integrity --check=CommitmentRoot` against a datadir and confirm all `.kv` files get checked.
AskAlexSharov
approved these changes
May 11, 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.
(#21025, #21026 were already present in performance)