Is MGet supported in cluster mode
eugenemiretsky opened this issue · comments
I am looking at the code in : https://github.com/scredis/scredis/blob/26adb78a27ba91c12a76eeab5f44fe5ba7d57150/src/main/scala/scredis/protocol/requests/StringRequests.scala
override val key: String = keys.head
Looks like MGet will just route the request to the node that owns the first key, which I believe will fail.
Yes that might be correct!
It was probably not designed to be used in cluster :/
Will double check and see if it is easily fixable.
shh yeah doesn't work, response is: CROSSSLOT Keys in request don't hash to the same slot
I checked docs and other clients and this 'mget' command is supposed to have atomicity guarantees and it is not intended to be used in cluster setup which means in other clients it is not available to be used in cluster setup.
Scredis allows sending everything in the same way to cluster and single instance but should not allow sending it to cluster.
Potentially partitioning and grouping keys for nodes could work but keys can migrate which breaks all logic that could be done here.
Proposed solution would be to disable sending requests which have override val key: String = keys.head
to cluster