Repository navigation
Cleanup how restoredKeys are tracked in LedgerTxn - #5134
Merged
Merged
Conversation
sisuresh
force-pushed
the
ltx-restored-keys
branch
from
February 11, 2026 22:09
4ee3a01 to
5613b9a
Compare
sisuresh
marked this pull request as ready for review
February 13, 2026 19:53
sisuresh
commented
Feb 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors how LedgerTxn tracks restored keys so that restored-entry bookkeeping is cleaner and better aligned with both non-parallel and parallel apply flows.
Changes:
- Stop inheriting/restoring “restored keys” state into child
LedgerTxns; children now track only their own restores and merge into parents on commit. - Add
markRestoredFromLiveBucketListto let the parallel-apply path explicitly record live BucketList restores inLedgerTxn. - Adjust transaction meta building and the
ArchivedStateConsistencyinvariant to use the updated restored-key semantics (notably around TTL entries).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/transactions/TransactionMeta.cpp |
Simplifies pre-v23 restored-live-BucketList tracking by relying on op-local restored maps and asserting only restore ops have them. |
src/transactions/ParallelApplyUtils.cpp |
Records both hot-archive and live-BucketList restores into LedgerTxn during global commit so invariants can validate them. |
src/ledger/test/InMemoryLedgerTxn.h |
Adds override for the new markRestoredFromLiveBucketList API in the in-memory test LedgerTxn. |
src/ledger/test/InMemoryLedgerTxn.cpp |
Implements the new override as a stub that throws (consistent with other unsupported ops in this class). |
src/ledger/LedgerTxnImpl.h |
Documents exception-safety behavior for markRestoredFromLiveBucketList. |
src/ledger/LedgerTxn.h |
Updates interfaces: removes duplicate-allowing merge in RestoredEntries::addRestoresFrom and adds the new live-BucketList restore marker API. |
src/ledger/LedgerTxn.cpp |
Implements markRestoredFromLiveBucketList, removes parent restored-map copying in child ctor, and enforces no-duplicates when merging restores. |
src/invariant/ArchivedStateConsistency.cpp |
Updates restore invariant checks to treat TTL entries specially (updated TTL vs preloaded TTL comparisons). |
sisuresh
force-pushed
the
ltx-restored-keys
branch
from
February 13, 2026 21:13
5613b9a to
53d138c
Compare
dmkozh
reviewed
Feb 14, 2026
SirTyson
reviewed
Feb 17, 2026
SirTyson
self-requested a review
February 25, 2026 18:43
sisuresh
enabled auto-merge
February 25, 2026 22:15
SirTyson
approved these changes
Feb 25, 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.
Description
Cleanup how restoredKeys are tracked in LedgerTxn
Checklist
clang-formatv8.0.0 (viamake formator the Visual Studio extension)