Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
59225: kvserver/tstracker: implement a better closedts tracker r=andreimatei a=andreimatei This patch implements a replacement for the existing minprop.Tracker. The new tracker is not yet hooked up. Compared to the old tracker, this new one is better in multiple ways: - it's supposed to be used at the level of a single range, not at the level of a node - it supports lock-free concurrent inserts - it's scope is smaller, making it cleaner and more optimal at the job of tracking requests. The old tracker combined tracking evaluating requests with various closed timestamps considerations: it was in charge of maintaining the closed timestamp, closing new timestamps, bumping requests to the closed timestamp, and the tracking that it did was relative to the closed timestamp. This new guy only deals with tracking (it doesn't know anything about closed timestamps), and so it will represent the tracked requests more accurately. The implementation is intended to work with the proposal buffer's locking model; locking is external to the tracker, but the caller is expected to hold a "read" lock while inserting requests for tracking, and a write lock while removing tracked requests. This matches how the proposal buffer handles its own insertions and flushing. The tracking is done using a two-rolling-buckets scheme inspired from the existing one, but rationalized more. Release note: None 59502: kvserver: fix a reproposal check r=andreimatei a=andreimatei In some situations, we repropose a command with a new LAI. When doing so, we need to make sure that the closed timestamp has not advanced past the command's write timestamp since the original proposal. Except we were checking the command's read timestamp, not write timestamp. Also changes a Less to a LessEq when comparing with the closed timestamp, which I think is how that comparison should be. Release note (bug fix): Fixed a very rare chance of inconsistent follower reads. Co-authored-by: Andrei Matei <[email protected]>
- Loading branch information