{"action":"created","issue":{"url":"https://api.github.com/repos/StackExchange/StackExchange.Redis/issues/838","repository_url":"https://api.github.com/repos/StackExchange/StackExchange.Redis","labels_url":"https://api.github.com/repos/StackExchange/StackExchange.Redis/issues/838/labels{/name}","comments_url":"https://api.github.com/repos/StackExchange/StackExchange.Redis/issues/838/comments","events_url":"https://api.github.com/repos/StackExchange/StackExchange.Redis/issues/838/events","html_url":"https://github.com/StackExchange/StackExchange.Redis/issues/838","id":326803035,"node_id":"MDU6SXNzdWUzMjY4MDMwMzU=","number":838,"title":"Multi-key operations in cluster","user":{"login":"danieljohannsen","id":8985253,"node_id":"MDQ6VXNlcjg5ODUyNTM=","avatar_url":"https://avatars2.githubusercontent.com/u/8985253?v=4","gravatar_id":"","url":"https://api.github.com/users/danieljohannsen","html_url":"https://github.com/danieljohannsen","followers_url":"https://api.github.com/users/danieljohannsen/followers","following_url":"https://api.github.com/users/danieljohannsen/following{/other_user}","gists_url":"https://api.github.com/users/danieljohannsen/gists{/gist_id}","starred_url":"https://api.github.com/users/danieljohannsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieljohannsen/subscriptions","organizations_url":"https://api.github.com/users/danieljohannsen/orgs","repos_url":"https://api.github.com/users/danieljohannsen/repos","events_url":"https://api.github.com/users/danieljohannsen/events{/privacy}","received_events_url":"https://api.github.com/users/danieljohannsen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-05-27T09:56:52Z","updated_at":"2018-06-19T15:29:00Z","closed_at":null,"author_association":"NONE","body":"In a Redis cluster, I get the following error message when retrieving a RedisValue array by parsing a RedisKey array in StringGet():\r\n\r\n> 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\r\n\r\n`at StackExchange.Redis.ServerSelectionStrategy.Select(Message message) at StackExchange.Redis.ConnectionMultiplexer.TryPushMessageToBridge[T](Message message, ResultProcessor`1 processor, ResultBox`1 resultBox, ServerEndPoint& server) at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor`1 processor, ServerEndPoint server) at StackExchange.Redis.RedisBase.ExecuteSync[T](Message message, ResultProcessor`1 processor, ServerEndPoint server) `\r\n\r\nWhat can I do to solve this?"},"comment":{"url":"https://api.github.com/repos/StackExchange/StackExchange.Redis/issues/comments/398441354","html_url":"https://github.com/StackExchange/StackExchange.Redis/issues/838#issuecomment-398441354","issue_url":"https://api.github.com/repos/StackExchange/StackExchange.Redis/issues/838","id":398441354,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODQ0MTM1NA==","user":{"login":"sergii-s","id":2659133,"node_id":"MDQ6VXNlcjI2NTkxMzM=","avatar_url":"https://avatars3.githubusercontent.com/u/2659133?v=4","gravatar_id":"","url":"https://api.github.com/users/sergii-s","html_url":"https://github.com/sergii-s","followers_url":"https://api.github.com/users/sergii-s/followers","following_url":"https://api.github.com/users/sergii-s/following{/other_user}","gists_url":"https://api.github.com/users/sergii-s/gists{/gist_id}","starred_url":"https://api.github.com/users/sergii-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergii-s/subscriptions","organizations_url":"https://api.github.com/users/sergii-s/orgs","repos_url":"https://api.github.com/users/sergii-s/repos","events_url":"https://api.github.com/users/sergii-s/events{/privacy}","received_events_url":"https://api.github.com/users/sergii-s/received_events","type":"User","site_admin":false},"created_at":"2018-06-19T15:29:00Z","updated_at":"2018-06-19T15:29:00Z","author_association":"NONE","body":"Hello @mgravell , I have one question about your point above :\r\n> `Options right now: \r\n> 1. use \"hash tags\" if the data is strongly related (this keeps related data in a single slot) \r\n> 2. use individual StringGet \r\n> 3. we implement a new API that does a scatter/gather (would need to wait for this) \r\n> 4. your code could manually groups by slots to perform multiple varadic gets`\r\n> Note that 2 doesn't necessarily have performance impact, as it can essentially be pipelined\r\n\r\nUnfortunately option 1 is not possible for me. \r\nI'm currently testing \"2\" and \"4\" options, but I've got a significant performance degradation when trying requesting 100+ keys in parallel due to TPL saturation. Grouping by slot improves perfs **a little bit**, but it's not enough. \r\n\r\nThe solution I suppose is to implement explicit Pipeline operation to regroup all parallel request into one. Unlike current implicit pipelining we will have only one TaskCompletionSource on the TPL.\r\n\r\nIs that what you meant by option 3 ? If no, do you think this solution is justifiable and could be eventually implemented ?"}}
{"actor":{"display_login":"sergii-s"}}