Skip to content

[Tsavorite] Fix post-checkpoint object cleanup - #2079

Open
Ted Hart (TedHartMS) wants to merge 5 commits into
mainfrom
tedhar-fix-checkpoint-cleanup-crash
Open

[Tsavorite] Fix post-checkpoint object cleanup#2079
Ted Hart (TedHartMS) wants to merge 5 commits into
mainfrom
tedhar-fix-checkpoint-cleanup-crash

Conversation

@TedHartMS

Copy link
Copy Markdown
Contributor

Description of Change

Replace the generic post-checkpoint log scan with an allocation-free value-only scan that does not remap overflow keys. Heap-object references are captured under epoch protection and cleared after releasing it.

Cleanup failures are logged without changing the result of a completed checkpoint.

Tests

Added coverage for overflow keys, concurrent eviction, absent cached data, cleanup failure isolation, and repeated incremental checkpoints on .NET 8 and 10.

Issues Fixed

Fixes #2072

Scan object values without remapping overflow keys and isolate cleanup failures from checkpoint success.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 0017de04-0a5f-48e4-a1ce-56620534a5d3

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reworks post-checkpoint object cleanup to avoid overflow-key remapping races while preserving successful checkpoint results.

Changes:

  • Adds an epoch-protected, value-only cleanup scan.
  • Makes cleanup failures non-fatal and logged.
  • Adds concurrency, overflow-key, and serialization-state tests.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/standalone/Garnet.test/RespAdminCommandsTests.cs Tests checkpoint completion and failure isolation.
libs/storage/Tsavorite/cs/test/test.recovery/ObjectLogScanTests.cs Tests cleanup boundaries, eviction, and serialization state.
libs/storage/Tsavorite/cs/src/core/Utilities/MultiLevelPageArray.cs Adds guarded slot lookup.
libs/storage/Tsavorite/cs/src/core/Index/Tsavorite/LogAccessor.cs Exposes cached-object cleanup.
libs/storage/Tsavorite/cs/src/core/Allocator/ObjectIdMap.cs Adds type-safe heap-object lookup.
libs/storage/Tsavorite/cs/src/core/Allocator/ObjectAllocatorImpl.cs Implements the value-only cleanup scan.
libs/storage/Tsavorite/cs/src/core/Allocator/IHeapObject.cs Clarifies cleanup semantics.
libs/storage/Tsavorite/cs/src/core/Allocator/HeapObjectBase.cs Avoids resetting unrelated serialization.
libs/storage/Tsavorite/cs/src/core/Allocator/AllocatorScan.cs Defines the allocator cleanup hook.
libs/server/Databases/DatabaseManagerBase.cs Uses isolated cleanup after checkpoints.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants