Repository navigation
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Calling
HashClient.remove_server()on a configured, healthy server raisesKeyError: the implementation unconditionally pops the server from_failed_clients, even when there has never been a connection failure. Consequently, callers cannot take a healthy node out of rotation using this method.For example:
Change
Make removal of the optional failure record tolerate an absent entry. Remove the node from the hasher before updating failure/dead bookkeeping, so an unknown node cannot accidentally be scheduled for reactivation after an unsuccessful removal.
Retain the existing dead-timeout recovery policy. Tests verify routing to the remaining server and reactivation after the timeout.
Validation
KeyErrorfor tuple addresses, separate host/port arguments, and Unix socket paths.--target-version py39), mypy for both changed files, andgit diff --checkpass.Local testing used the existing isolated environment with
zstd==1.5.7.2; live-server integration and benchmark tests were deselected by the repository's unit-test configuration. Black's target override is needed because the repository listspy314while pinning Black 24.4.2, which does not recognize that target. The six existing full-package mypy errors in the untouched AWS client module were previously confirmed on clean master; no dependency or CI configuration changes are included here.This branch starts directly from master and is independent of #669.