thunks/thunk-redis

multi() has a confusing behavior

thelinuxlich opened this issue · 2 comments

If I run something like this:

yield [
redis.multi(),
redis.lrange(key,0,-1),
redis.ltrim(key,100,-1),
redis.exec()
]

For some keys I get a result like [ 'OK', 'QUEUED', 'QUEUED', [ LRANGE_RESULT, LTRIM_RESULT ] ] and for others [ 'OK', LRANGE_RESULT, LTRIM_RESULT, [] ]

I'm running a cluster exactly like the official tutorial, with 3 masters and 3 slaves. Is this inconsistency normal?

I think I found out how to solve this issue by passing the key to .multi() and .exec().

This change should be documented

Yes, need more documents.