forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: avoid bootstrapping closedTS state with the lease start time
This commit reverts the main change introduced in cockroachdb#35130. That change made it such that each replica could bootstrap its `maxClosed` timestamp value with the start time of the latest lease that it knew about. However, it doesn't consider the fact that when the lease transfer occurred, the range may have been in a subsumed state and thus, is not allowed to serve any requests past the subsumption time. Bumping a replica's closed timestamp by the lease start time allows for a bug where the closed timestamp of a replica may be advanced past the subsumption time of a range, which would allow the range's non-leaseholder replicas to serve follower reads past its subsumption time. Such a sequence of events would in turn allow follower reads queries to serve results that could be invalidated by future writes on the keyspan owned by the subsumed range. Release note (bug fix): A rare bug present in 20.2 that allowed `AS OF SYSTEM TIME` queries to serve inconsistent results has been resolved.
- Loading branch information
1 parent
c159beb
commit ac60e52
Showing
6 changed files
with
60 additions
and
111 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