forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ptstorage: change Protect and GetRecord to work with
target
column
Protected timestamp records now apply to a `ptpb.Target` instead of `roachpb.Spans`. Protect will now write the `Target` on the record to the `target` column in the system.pts_records table, and `GetRecord` will read the `target` column when constructing a `ptpb.Record` to return to the caller. If we are running in a mixed version state where the relevant migration to the system.pts_records table has not run, we use the existing logic to protect Spans. Once the migration has run, all calls to protect must have a non-nil `Target` field on the record. While the new subsystem is under development, we write both the `Spans` and the `Target` post migration. Once the GC queue has been taught to use the `Target` field when making GC decisions, we will write an empty `Spans` field in the `Protect` method, before persisting state in the system table. All new records will no longer be reliant on the Spans column, paving the way for deleting all Span related logic in a future release. This change tweaks the tests in `ptstorage_test` to populate the `Target` field. All other test changes in `ptverifier`, `ptcache`, `kvserver` are only to get past the "target is nil" validation step. These tests will be changed as and when we develop those pieces of the subsystem. Informs: cockroachdb#73727 Release note: None
- Loading branch information
1 parent
3d7425b
commit 859c54d
Showing
12 changed files
with
460 additions
and
113 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
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
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
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
Oops, something went wrong.