Skip to content

kvserver: maintain separate account of follower-read traffic on the leaseholder #75630

@aayushshah15

Description

@aayushshah15

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-kv-distributionRelating to rebalancing and leasing.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-kvKV Team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions