You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a reason why setnx isn't supported in the sharding api? It seems like it could/should be. Wasn't sure if there was a reason why it wouldn't work.
The text was updated successfully, but these errors were encountered:
Yes it should work fine.. maybe we just forgot to add that to the list of supported methods for sharding. I just added, please give it a try and let us know.
Thanks!
The more I look at the api the more I think you shouldn't restrict the methods callable from the RedisShardingAPI. Since you support the bracket syntax for extracting the token to use to lookup the node, I am able to use most redis api calls effectively.
Even calls like RPOPLPUSH which could get confusing can be done.
RPOPLPUSH(queue, backupqueue)
This would be a problem if you assumed you could now do a
RPOP(backupqueue)
and find the item since backupqueue hashes differently.
Except instead you can do
RPOPLPUSH(queue-{queue}, backupqueue-{queue})
I guess my preference is to allow developers to shoot themselves in the foot, but give them some warnings.
Is there a reason why setnx isn't supported in the sharding api? It seems like it could/should be. Wasn't sure if there was a reason why it wouldn't work.
The text was updated successfully, but these errors were encountered: