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

Report missing slots in multi-slot request. #86

Merged
merged 2 commits into from
Jan 2, 2024

Conversation

nihohit
Copy link

@nihohit nihohit commented Dec 27, 2023

Issue #, if available:
valkey-io/valkey-glide#705

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.

}),
)
} else {
let _ = sender.send(Err((
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand it right, if we have one cmd that we can't find the connection for it, all of the multi-command will be failed. right?
If so, why do we need to continue mapping after we send the error?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function doesn't take the response_policy into account, in order to remain simple. You're right that for some response policies we could fail immediately, but that would require more code complexity, and it would mean that if a function has side effects (SCRIPT LOAD, for example), no node will be affected - it would be equivalent to all nodes failing.

@shachlanAmazon shachlanAmazon merged commit d7dc403 into amazon-contributing:main Jan 2, 2024
9 of 10 checks passed
@nihohit nihohit deleted the missing-slots branch January 2, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants