-
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.
kvclient: don't spin in the DistSender trying the same replica over a…
…nd over This patch addresses a scenario where a lease indicates a replica that, when contacted, claims to not have the lease and instead returns an older lease. In this scenario, the DistSender detects the fact that the node returned an old lease (which means that it's not aware of the new lease that it has acquired - for example because it hasn't applied it yet whereas other replicas have) and retries the same replica (with a backoff). Before this patch, the DistSender would retry the replica ad infinitum, hoping that it'll eventually become aware of its new lease. However, it's possible that the replica never finds out about this new lease (or, at least, not until the lease expires and a new leaseholder steps up). This could happen if the a replica acquires a lease but gets partitioned from all the other replicas before applying it. This patch puts a bound on the number of times the DistSender will retry the same replica in a row before moving on to others. Release note: None
- Loading branch information
1 parent
1f49884
commit 8d54bce
Showing
2 changed files
with
123 additions
and
2 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