-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
51139: kvserver: check start-time above GC threshold r=dt a=dt checkExecutionCanProceed typically checks that a request that is intending to operate at a specific time will be doing so at or above the GC threshold. It previously did this by comparing the ba.Timestamp to the (implied) GC threshold, as this is the common field on all batches that indicate the time at which they will operate. However a few special types of requests operate on *a span* of time, rather than at a particular time. For example, ExportRequest can ask to export all revisions between its start and end times, or RevertRange can ask that all revisions between its TargetTime and EndTime be destoryed. These commands require that the GC threshold be not just below their end-time -- which they set in ba.Timestamp, but also below their start-time, to ensure those revisions they want to operate on are still there. Previously they each checked this manually during evaluation. However these checks were inconsistent with the common check that the kvserver usually does on ba.Timestamp before even calling evaluation: they used a different error type and, when the common check was extended to be strict w.r.t. the TTL, they continued to only check the actual GC time. This change instead updates that common check to read the ealier of the batch timestamp or, if one of the requests in the batch is known to have a start time, the earliest of those times. This then means that the enforcement of 'this batch is operating at a timestamp above the GC TTL' has the same semantics for batches thatt operate at a single time or on a span of time. Release note: none. Co-authored-by: David Taylor <[email protected]>
- Loading branch information
Showing
6 changed files
with
61 additions
and
40 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