Skip to content
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

Clarify that top fanout operations don't retry. #33

Merged
merged 1 commit into from
Sep 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions redis/src/cluster_async/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ enum Next<I, C> {
},
Reconnect {
request: PendingRequest<I, C>,
target: OperationTarget,
target: String,
},
RefreshSlots {
request: PendingRequest<I, C>,
Expand Down Expand Up @@ -385,7 +385,7 @@ where
let address = match target {
OperationTarget::Node { address } => address,
OperationTarget::FanOut => {
// TODO - implement retries on fan-out operations
// Fanout operation are retried per internal request, and don't need additional retries.
self.respond(Err(err));
return Next::Done.into();
}
Expand Down Expand Up @@ -428,7 +428,7 @@ where
}
ErrorKind::IoError => Next::Reconnect {
request: this.request.take().unwrap(),
target: OperationTarget::Node { address },
target: address,
}
.into(),
_ => {
Expand Down Expand Up @@ -1073,13 +1073,8 @@ where
Next::Reconnect {
request, target, ..
} => {
poll_flush_action = match target {
OperationTarget::Node { address } => poll_flush_action
.change_state(PollFlushAction::Reconnect(vec![address])),
OperationTarget::FanOut => {
poll_flush_action.change_state(PollFlushAction::RebuildSlots)
}
};
poll_flush_action =
poll_flush_action.change_state(PollFlushAction::Reconnect(vec![target]));
self.inner.pending_requests.lock().unwrap().push(request);
}
}
Expand Down
Loading