Skip to content

Preserve store flags on rollback#7975

Draft
achamayou with Copilot wants to merge 3 commits into
mainfrom
copilot/microsoft-ccf-7796-update-store-flags
Draft

Preserve store flags on rollback#7975
achamayou with Copilot wants to merge 3 commits into
mainfrom
copilot/microsoft-ccf-7796-update-store-flags

Conversation

Copilot AI commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Closes #7796.

Rollback was mutating store-level flags, contributing to unsafe cross-thread access around snapshot/chunk decisions. In 7.0 chunk boundaries are leader-decided, so rollback can leave these flags untouched.

  • KV rollback

    • Stop clearing SNAPSHOT_AT_NEXT_SIGNATURE during Store::rollback().
    • Rollback now restores versioning state without changing pending store-level chunk/snapshot intent.
  • Regression coverage

    • Extend Ledger entry chunk request coverage to assert rollback preserves the snapshot flag and still requests a chunk at the next signature.
store.rollback({store.commit_view(), store.current_version() - 1}, store.commit_view());

REQUIRE(store.flag_enabled(
  ccf::kv::AbstractStore::StoreFlag::SNAPSHOT_AT_NEXT_SIGNATURE));

Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate updating store flags on rollback Preserve store flags on rollback Jun 24, 2026
Copilot AI requested a review from achamayou June 24, 2026 21:10
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.

Do store flags need to be updated on rollback?

2 participants