Does Pipeline work for keys belonging to different master nodes #2822
Unanswered
dhruvil-alphonso
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I was trying to execute a pipeline with following commands
ZREVRANGE IFC:{3136916448}:13327 0 -1
,ZREVRANGE IFC:{1658643328}:13326 0 -1
,ZREVRANGE IFC:{1935849550}:13344 0 -1
.All 3 keys belong to different master nodes (in turn hash slots). I was expecting this to not work, but to my surprise I got correct response for all three commands.
Further more, I executed a TxPipeline with a ZADD command on the above keys, and that worked too.
My question is, Can we use pipeline & txpipeline to execute multiple commands for keys belonging to different masters ?
Upon some researching, I can see here [https://github.com/redis/go-redis/blob/v8.11.5/cluster.go#L1098] that we are doing some sort of mapping of a cmd to a node based on hash slot, but since this is not documented properly anywhere, wanted to ask here.
My go-redis version is : 8.11.5
Beta Was this translation helpful? Give feedback.
All reactions