Handle missing connections without panicking. - #92
Merged
shachlanAmazon merged 4 commits intoJan 2, 2024
Conversation
nihohit
force-pushed
the
no-connection-panic
branch
3 times, most recently
from
December 31, 2023 17:56
88df05c to
089a045
Compare
barshaul
reviewed
Jan 1, 2024
| return Next::Done.into(); | ||
| } | ||
| OperationTarget::NoTargetFound => { | ||
| warn!("No connection found: `{err}`"); |
Author
There was a problem hiding this comment.
What part of the request info? We don't log commands, because they might contain PPI.
barshaul
reviewed
Jan 1, 2024
| .connection_for_route(&route) | ||
| .map_or(ConnectionCheck::Nothing, ConnectionCheck::Found), | ||
| InternalSingleNodeRouting::Random => ConnectionCheck::Nothing, | ||
| .map_or(ConnectionCheck::RandomConnection, ConnectionCheck::Found), |
There was a problem hiding this comment.
We should note that if the user do some request with a specific node route, and this node isn't found, we will route it to a random node. If the command is key-based, there's no harm. however, if the command is for example flushall, config set, or other management command - it will be transparent to the user.
We might want to add a warning here
barshaul
approved these changes
Jan 1, 2024
This prevents the client from looping in recovery mode forever, if there's no contact with the server.
nihohit
force-pushed
the
no-connection-panic
branch
from
January 1, 2024 16:58
089a045 to
5495b3f
Compare
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.
Issue #, if available:
valkey-io/valkey-glide#733
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.