Skip to content

fix: persist next_idx over checkpoint for LogMemoryStore#9309

Draft
maksymar wants to merge 23 commits intomasterfrom
maksym/fix-lms-in-sandbox
Draft

fix: persist next_idx over checkpoint for LogMemoryStore#9309
maksymar wants to merge 23 commits intomasterfrom
maksym/fix-lms-in-sandbox

Conversation

@maksymar
Copy link
Contributor

@maksymar maksymar commented Mar 11, 2026

This PR ensures canister log record unique idx is preserved over checkpoint and other lifecycle events.

Previously the next_idx was stored inside LogMemoryStore::maybe_page_map, and reset to zero whenever the underlying page_map was dropped. This PR introduced a persisten_next_idx field in LogMemoryStore that persists independently of that page_map, acting as a high-water mark. This guarantees index continuity even if the caniser is uninstalled and re-installed.

@github-actions github-actions bot added the fix label Mar 11, 2026
@maksymar maksymar changed the title fix: use feature flag to switch canister logs in sanbox fix: preserve next_idx over checkpointing for LogMemoryStore Mar 11, 2026
@maksymar maksymar changed the title fix: preserve next_idx over checkpointing for LogMemoryStore fix: preserve next_idx over checkpoint for LogMemoryStore Mar 11, 2026
@maksymar maksymar changed the title fix: preserve next_idx over checkpoint for LogMemoryStore fix: persist next_idx over checkpoint for LogMemoryStore Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant