Implement RedisClient::Cluster::Command#extract_all_keys #312
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is required to validate that all the keys passed in to a pinned connection are consistent with the key passed in to
#with
. Technically speaking, we could let the Redis server just reject keys that are cross-node. However, there is a good reason to perform the validation in the client.Redis clusters have 16,000 odd slots, but usually only a handful of nodes. It's quite possible you might create a transaction which operates across slots, but have it work fine because the slots just happen to hash to the same node. However, if a resharding event then happens, suddednly your working-fine code will break! It's nice for users to receive feedback straight away, even on very small development setups, that their cross-slot transactions may well not actually work later on.