Fixes for Vector Set RENAMEs in AOF replay - #2080
Merged
Merged
Conversation
…o add those blocks
…ach other; special case renames when copying a Vector Set as we need to ensure context and index pointer consistency there
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes Vector Set rename handling during AOF recovery and coordinates background vector operations around replay.
Changes:
- Records rename metadata and reconstructs Vector Set indexes during replay.
- Adds recovery quiescence waits and Vector Set reconciliation.
- Adds AOF rename recovery tests.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
test/standalone/Garnet.test.vectorset/VectorSetOverwriteTests.cs |
Uses the expanded quiescence wait. |
test/standalone/Garnet.test.vectorset/RespVectorSetTests.cs |
Tests rename recovery scenarios. |
libs/storage/Tsavorite/cs/src/core/ClientSession/ManageClientSessions.cs |
Removes blank lines. |
libs/server/StoreWrapper.cs |
Reorders vector recovery around AOF replay. |
libs/server/Storage/Session/UnifiedStore/UnifiedStoreOps.cs |
Records rename keys and record type. |
libs/server/Storage/Functions/UnifiedStore/VarLenInputMethods.cs |
Restores record type during replay. |
libs/server/Storage/Functions/UnifiedStore/UpsertMethods.cs |
Separates rename metadata from expiration. |
libs/server/Resp/Vector/VectorManager.Replication.cs |
Handles flag replay and rename copying. |
libs/server/Resp/Vector/VectorManager.cs |
Formatting-only change. |
libs/server/Resp/Vector/VectorManager.Cleanup.cs |
Expands background-work waiting. |
libs/server/Databases/SingleDatabaseManager.cs |
Waits for vector replay and cleanup. |
libs/server/Databases/MultiDatabaseManager.cs |
Adds per-database vector quiescence. |
libs/server/Databases/IDatabaseManager.cs |
Updates recovery-order documentation. |
libs/server/AOF/AofProcessor.cs |
Special-cases Vector Set rename upserts. |
libs/cluster/Server/Replication/ReplicationManager.cs |
Reconciles vectors before cluster AOF replay. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Ted Hart (TedHartMS)
approved these changes
Aug 20, 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.
A number of issues exist if Vector Sets are
RENAME'd during AOF replay.Fundamentally
RENAMEis a little weird as it is not a single operation against the Tsavorite log, but rather a bundle of gets, deletes, and sets covered by a transaction. Related fix #2071 .This PR fixes these by:
SetFlagsversion ofVADDVADDs and various cleanup tasks to complete before and after AOF recovery startsRENAME's associatedUnifiedStoreStringUpsertop in the AOFcontextandindexPtractually stored in the value are not necessarily correct during replay and need to be refreshed with current values