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 SPOP from Lua scripts #3278

Merged
merged 1 commit into from May 30, 2016
Merged

Allow SPOP from Lua scripts #3278

merged 1 commit into from May 30, 2016

Conversation

itamarhaber
Copy link
Member

The existing R flag appears to be sufficient and there's no apparent reason why the command should be blocked.

Ref: #2139

The existing `R` flag appears to be sufficient and there's no apparent reason why the command should be blocked.
@ramonsnir
Copy link
Contributor

I think it has to do with the randomness of the item selection?

@itamarhaber
Copy link
Member Author

@ramonsnir the R flag means "random command" and should thus remain. The s flag blocks the command's usage from Lua scripts entirely, and that's not what the other random commands use.

Prior to v3.2 random commands were not allowed in Lua scripts after writes, but you could always call them before (i.e in "read-only" mode). From v3.2 and onwards, we have redis.replicate_commands() that allows calling random commands even after writes.

@antirez antirez merged commit 9200312 into redis:unstable May 30, 2016
@antirez
Copy link
Contributor

antirez commented May 30, 2016

Thanks @itamarhaber, yep looks like an error. Backporting to 3.2.

JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Aug 29, 2016
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.

None yet

3 participants