Skip to content

2.6 rc8 - Write commands not allowed after non deterministic commands #703

Closed
shigekihirose opened this Issue Oct 8, 2012 · 1 comment

2 participants

@shigekihirose

Trying to get current date/time from within Lua script using 2.6 rc8. After redis.call('time'), write commands fail:

-- this works :
redis> eval "local time_result = redis.call('time') return time_result[1]" 0
"1349715265"

-- this fails :
redis> eval "local time_result = redis.call('time') redis.call('zadd', 'some_key', 1, 'abc')" 0
(error) ERR Error running script (call to f_a49ed2fea72f1f527753d6024d1515e76e69bcbd): Write commands not allowed after non deterministic commands
redis>

@antirez
Owner
antirez commented Oct 10, 2012

This is a feature, please refer to the EVAL documentation and if you have still questions to ask we'll be glad to answer them in the Redis google group. Thanks!

@antirez antirez closed this Oct 10, 2012
@JackieXie168 JackieXie168 pushed a commit that referenced this issue Sep 16, 2014
@neumino neumino Fix #703 4c9433f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.