-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: reset tscache after merge to closed ts
This patch deals with what happens to the RHS's timestamp cache on a merge. Before this patch, we were either not touching the cache at all, when the leases of the LHS and RHS were collocated at merge time, or we were bumping the RHS's ts cache up to the freeze point otherwise (because, in this case, the RHS's ts cache info has been lost). This patch goes further: now we'll bump the RHS ts cache up to the RHS closed timestamp on the argument the the RHS's closed timestamp is lost. This patch is needed by the effort to move closed timestamp to be per-range instead of per-store, and also to have future-time closed timestamps. Today, the new ts cache bump is not necessary for a fairly subtle reason: if the pre-merge leases are collocated,, then the closed ts of the RHS is not "lost" because it's the same as the one of the LHS. If the leases are not collocated, the freeze time of the RHS is certainly above its closed ts. So, in either case, the current code doesn't lead to the possibility of accepting write post-merge that invalidate previous follower reads. The RHS' closed timestamp is plumbed from the freeze to the merge through subsume response. Release note: None
- Loading branch information
1 parent
f19bb99
commit 14b56a2
Showing
11 changed files
with
1,386 additions
and
1,181 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
Oops, something went wrong.