-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consolidate Standalone and Cluster Snapshot Metadata #1147
base: main
Are you sure you want to change the base?
Conversation
1b4acb2
to
89c161d
Compare
@@ -232,13 +227,15 @@ public byte[] GetIndexCheckpointMetadata(Guid indexToken) | |||
} | |||
|
|||
/// <inheritdoc /> | |||
public virtual unsafe void CommitLogCheckpoint(Guid logToken, byte[] commitMetadata) | |||
public virtual unsafe void CommitLogCheckpoint(Guid logToken, HybridLogRecoveryInfo hlri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HybridLogRecoveryInfo is an internal detail of Tsavorite that ideally should not be visible to plugin API. Instead Tsavorite interacts with the checkpoint plugin with two APIs:
byte[] CheckpointCookieState()
void RecoverCookieState(byte[] cookie)
During checkpoint, it uses #1 to get the cookie to add to HLRI. During recovery, it uses #2 to tell the plugin what the recovered cookie is.
5e993ff
to
9d76661
Compare
9d76661
to
3ee8c69
Compare
This PR consolidates the standalone and cluster snapshot metadata format by making the user cookie part of HybridLogRecoveryInfo. This way on recovery the cookie is either deserialized or set to null and ignored if not needed.