Skip to content

[r3.4] perf cherry-picks: commitment rebuild resume, seg retire merge, kv integrity#21135

Merged
sudeepdino008 merged 4 commits into
release/3.4from
awskii/perf-cps_34
May 12, 2026
Merged

[r3.4] perf cherry-picks: commitment rebuild resume, seg retire merge, kv integrity#21135
sudeepdino008 merged 4 commits into
release/3.4from
awskii/perf-cps_34

Conversation

@awskii

@awskii awskii commented May 12, 2026

Copy link
Copy Markdown
Member

Cherry-picks to release/3.4:

…#20939)

- `--resume` already supported with history commitment rebuild

(cherry picked from commit 9a82c58)
…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)

(cherry picked from commit fa2ab7f)
## 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.

(cherry picked from commit a98a674)
@awskii awskii added this to the 3.4.2 milestone May 12, 2026
@sudeepdino008 sudeepdino008 merged commit 12a9d42 into release/3.4 May 12, 2026
23 checks passed
@sudeepdino008 sudeepdino008 deleted the awskii/perf-cps_34 branch May 12, 2026 10:22
yperbasis added a commit that referenced this pull request May 21, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
yperbasis added a commit that referenced this pull request May 21, 2026
## Summary

- Backfills `ChangeLog.md` with entries for v3.2.3, v3.3.1–v3.3.10,
v3.4.0, and v3.4.1 (previously the file stopped at v3.3.0).
- Drafts the v3.4.2 entry (release date TBD): two bugfixes (#21157,
#21262) and two improvements (#21148, #21135).
- Corrects the v3.3.0 release date to 2025-11-27 to match the GitHub
publish date.

## Test plan

- [ ] Skim the rendered changelog on GitHub for formatting.
- [ ] Confirm v3.4.2 draft contents before tagging.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants