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

update sort command to be a write operation #554

Merged
merged 1 commit into from
Aug 25, 2020
Merged

update sort command to be a write operation #554

merged 1 commit into from
Aug 25, 2020

Conversation

mfettig
Copy link

@mfettig mfettig commented Mar 18, 2019

Addresses #468

As noted in the linked issue, Redis treats all SORT commands as 'write' operations
https://github.com/antirez/redis/blob/4.0/src/server.c#L252

This patch removes 'SORT' from the array returned by ReplicationStrategy::getReadOnlyOperations() and removes the isSortReadOnly() helper method. Related tests were also updated.

@mfettig
Copy link
Author

mfettig commented Mar 18, 2019

build appears to fail because travis is using redis-server with version 4.0.x, which has a different error message than expected when selecting a DB out of range

redis/redis@c7a4e69

@nrk nrk self-requested a review August 14, 2020 16:47
@nrk nrk self-assigned this Aug 14, 2020
@nrk nrk added bug client-replication Replication (managed by Predis) redis-sentinel Replication (managed by redis-sentinel) labels Aug 24, 2020
@nrk nrk merged commit 0eb2633 into predis:v1.1 Aug 25, 2020
@nrk
Copy link
Contributor

nrk commented Aug 25, 2020

Thank you! Fixes will be included with Predis v1.1.4 when it's released.

@nrk nrk linked an issue Aug 25, 2020 that may be closed by this pull request
@mfettig mfettig deleted the issue-468 branch March 30, 2023 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug client-replication Replication (managed by Predis) redis-sentinel Replication (managed by redis-sentinel)
Development

Successfully merging this pull request may close these issues.

SORT with read-only slave
2 participants