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: proxy requests that return a NotLeaseholderError
This handles Partial partitions from the DistSender layer. DistSender has two major changes: 1) If it wants to send a request to a Leaseholder but the original attempt failed and its moved on to a different replica, it will send the request as a proxy request to the follower instead of a normal request. This is indicated by setting the new ProxyRangeInfo field. 2) If it receives a request with the ProxyRangeInfo field, it will create a "1-node" transport with only the leaseholder and additionally validate that it agrees with the client on the final destination. On the server side. If we receive a request with ProxyRangeInfo set, we will proxy that request to the intendend leaseholder rather than even looking at the request. Epic: none Fixes: cockroachdb#93503 Release note (ops change): This PR adds an additional setting kv.dist_sender.proxy.enabled which is defaulted to true. When it is enabled, proxy requests will be routed through a follower replica when the leaseholder is unavailable.
- Loading branch information
1 parent
199586f
commit 6a29c47
Showing
4 changed files
with
196 additions
and
23 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