-
Notifications
You must be signed in to change notification settings - Fork 4.1k
kvserver: maintain separate account of follower-read traffic on the leaseholder #75630
Description
As of #72296 and #65379, when trying to compute the best replica to transfer a range's lease to, we simulate the result of the lease transfer by assuming that all of the current leaseholder's load will move to the target of the lease transfer.
This is incorrect because some percentage of the current leaseholder's traffic could be from follower reads requests, which will stay unchanged after the lease transfer. Our ability to simulate this today is limited because, on the leaseholder, we don't currently keep track of requests that may have been able to be served as follower reads on the leaseholder. We should fix this so that our QPS based lease transfer logic can simulate the result of a lease transfer more accurately.
/cc. @nvanbenschoten
/cc. @cockroachdb/kv-notifications
Jira issue: CRDB-12748
Epic CRDB-14204