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

Allow by/get of sort(ro) in cluster mode. #2611

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

CharlesChen888
Copy link
Contributor

Copy link

netlify bot commented Nov 29, 2023

👷 Deploy request for redis-doc pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5f30364

commands/sort.md Outdated
@@ -105,8 +105,7 @@ SORT mylist BY weight_* GET object_* GET #

## Restrictions for using external keys

When enabling `Redis cluster-mode` there is no way to guarantee the existence of the external keys on the node which the command is processed on.
In this case, any use of `GET` or `BY` which reference external key pattern will cause the command to fail with an error.
Specially, in `Redis cluster-mode`, `BY` or `GET` can only be used when pattern contains hash tag and implies a specific slot which the key is also in, which means any key matching this pattern must be in the same slot as the key, and therefore in the same node. For example, in cluster mode, `{mylist}weight_*` is acceptable as a pattern when sorting `mylist`, while pattern `{abc}weight_*` will be denied, causing the command to fail with an error.
Copy link
Member

Choose a reason for hiding this comment

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

LGTM, but i think we're missing a word about older version (mention that before 8.0, this was disallowed)

@oranagra oranagra added waiting-for-upstream waiting for a redis PR to be merged to-be-merged should probably be merged soon labels Nov 29, 2023
@soloestoy soloestoy merged commit ee795e4 into redis:master Mar 1, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to-be-merged should probably be merged soon waiting-for-upstream waiting for a redis PR to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants