-
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.
69513: kvserver: cleanup liveness retry code r=andreimatei a=andreimatei This patch improves the code around retries of liveness heartbeat. Before this patch, if a heartbeat was canceled, it might have resulted in an AmbiguousResultError, which was turned into an explicitly retriable error, which was causing a retry but the retry was explicitly short-circuited on canceled ctx. The convoluted logic was mis-interpreted by me a fellow on first read. The patch also has the This patch simplifies the logic by making an AmbiguousResultError caused by a canceled ctx not result in a retryable error in the first place. As a nice side-effect, this results in the original error propagating to the Heartbeat() caller, rather than a vanilla "context canceled" before. The patch also adds a test about the behavior on this kind of error, which was a bug in the past but not tested when it was fixed. Release note: None Co-authored-by: Andrei Matei <[email protected]>
- Loading branch information
Showing
5 changed files
with
141 additions
and
15 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
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