-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#22597] YSQL: Add Save/Restore state functionality to ConsistentRead…
…Point Summary: In context of the https://phorge.dev.yugabyte.com/D32313 it is required to preserve and restore the state of the `ConsistentReadPoint`. The `ConsistentReadPoint` objects are no copyable due to mutex. To preserve current state of the object new class `Momento` is introduced. This class contains all the fields, which is required to represent the sate of `ConsistentReadPoint`. All the fields in this class are private to avoid breaking of `ConsistentReadPoint` invariants in situation like this ``` auto momento = rp.GetMomento(); momento.read_time = ...; rp.SetMomento(std::move(momento)); ``` **Note:** The diff contains some formatting and include cleanup changes. Jira: DB-11503 Test Plan: Jenkins Reviewers: sergei, pjain Reviewed By: sergei, pjain Subscribers: ybase Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D35372
- Loading branch information
1 parent
8dc7196
commit 0dcc22b
Showing
2 changed files
with
58 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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