-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executing Multi Slot commands through Envoy Proxy #2426
Comments
Is there a documented list of which operations support this? We could simply let these through and let the server worry about it - it would be a simple case of changing the envoy handling here to simply do |
@mgravell their documentation have not mentioned any such list. This is what their document mentioned on this topic.
Also, they don't support all the Redis commands at this moment and |
Thoughts @NickCraver ? I'm thinking "disable the check" (i.e. just |
+1 - this is only optimizing an error path to throw faster, if that's not 100% correct let's rip it out! |
PR: #2428 |
Thanks @mgravell and @NickCraver! |
I have a cache which consists of multiple standalone Redis instances all behind an Envoy Proxy. As per the Envoy documentation, it is capable of fanning out a multi slot command like MGET to the right Redis instances based on its hash slot. It works as expected when I run such commands through redis-cli.
But in my .NET application, when I issue such command through StackExchange.Redis, it throws an exception saying
Multi-key operations must involve a single slot;
Wondering is there any way to execute such operations in my step?StackExchange.Redis.RedisCommandException HResult=0x80131500 Message=Multi-key operations must involve a single slot; keys can use 'hash tags' to help this, i.e. '{/users/12345}/account' and '{/users/12345}/contacts' will always be in the same slot Source=StackExchange.Redis StackTrace: at StackExchange.Redis.ServerSelectionStrategy.Select(Message message, Boolean allowDisconnected) in /_/src/StackExchange.Redis/ServerSelectionStrategy.cs:line 148 at StackExchange.Redis.ConnectionMultiplexer.SelectServer(Message message) in /_/src/StackExchange.Redis/ConnectionMultiplexer.cs:line 1828 at StackExchange.Redis.ConnectionMultiplexer.PrepareToPushMessageToBridge[T](Message message, ResultProcessor
1 processor, IResultBox1 resultBox, ServerEndPoint& server) in /_/src/StackExchange.Redis/ConnectionMultiplexer.cs:line 1843 at StackExchange.Redis.ConnectionMultiplexer.TryPushMessageToBridgeSync[T](Message message, ResultProcessor
1 processor, IResultBox1 resultBox, ServerEndPoint& server) in /_/src/StackExchange.Redis/ConnectionMultiplexer.cs:line 1905 at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor
1 processor, ServerEndPoint server, T defaultValue) in /_/src/StackExchange.Redis/ConnectionMultiplexer.cs:line 1966at StackExchange.Redis.RedisBase.ExecuteSync[T](Message message, ResultProcessor
1 processor, ServerEndPoint server, T defaultValue) in /_/src/StackExchange.Redis/RedisBase.cs:line 62 at StackExchange.Redis.RedisDatabase.StringGet(RedisKey[] keys, CommandFlags flags) in /_/src/StackExchange.Redis/RedisDatabase.cs:line 3028 at Program.<Main>$(String[] args) in C:\Users\ravgup\source\repos\ConsoleApp14\ConsoleApp14\Program.cs:line 10
The text was updated successfully, but these errors were encountered: