From e2f619a9accb54aafe811fc77f97574e17f55d89 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Sun, 30 Aug 2015 10:52:19 +0200 Subject: [PATCH] Polishing after merge #118 --- .../redis/cluster/ClusterDistributionChannelWriter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/lambdaworks/redis/cluster/ClusterDistributionChannelWriter.java b/src/main/java/com/lambdaworks/redis/cluster/ClusterDistributionChannelWriter.java index f2ee2151a0..048d160f78 100644 --- a/src/main/java/com/lambdaworks/redis/cluster/ClusterDistributionChannelWriter.java +++ b/src/main/java/com/lambdaworks/redis/cluster/ClusterDistributionChannelWriter.java @@ -1,6 +1,7 @@ package com.lambdaworks.redis.cluster; import static com.google.common.base.Preconditions.checkArgument; +import static com.lambdaworks.redis.cluster.SlotHash.getSlot; import java.util.List; @@ -81,7 +82,7 @@ public > C write(C command) { } if (channelWriter == null && args != null && args.getFirstEncodedKey() != null) { - int hash = getHash(args.getEncodedKey(0)); + int hash = getSlot(args.getFirstEncodedKey()); ClusterConnectionProvider.Intent intent = getIntent(command.getType()); RedisChannelHandler connection = (RedisChannelHandler) clusterConnectionProvider.getConnection(intent,