-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle missing connections without panicking. #92
Handle missing connections without panicking. #92
Conversation
88df05c
to
089a045
Compare
@@ -461,17 +470,16 @@ impl<C> Future for Request<C> { | |||
self.respond(Err(err)); | |||
return Next::Done.into(); | |||
} | |||
OperationTarget::NoTargetFound => { | |||
warn!("No connection found: `{err}`"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also log the RequestInfo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What part of the request info? We don't log commands, because they might contain PPI.
redis/src/cluster_async/mod.rs
Outdated
@@ -1165,18 +1174,16 @@ where | |||
} | |||
InternalSingleNodeRouting::SpecificNode(route) => read_guard | |||
.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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
This prevents the client from looping in recovery mode forever, if there's no contact with the server.
089a045
to
5495b3f
Compare
9850815
into
amazon-contributing:main
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.