Fixed - a new attempt is not made if node with defined slot hasn't been discovered. #2234

pull/2247/head^2
Nikita Koksharov 6 years ago
parent 6af30bca91
commit 8a898ced46

@ -403,13 +403,13 @@ public class CommandAsyncService implements CommandAsyncExecutor {
private NodeSource getNodeSource(String key) {
int slot = connectionManager.calcSlot(key);
MasterSlaveEntry entry = connectionManager.getEntry(slot);
return new NodeSource(entry);
return new NodeSource(entry, slot);
}
private NodeSource getNodeSource(byte[] key) {
int slot = connectionManager.calcSlot(key);
MasterSlaveEntry entry = connectionManager.getEntry(slot);
return new NodeSource(entry);
return new NodeSource(entry, slot);
}
@Override

@ -37,6 +37,11 @@ public class NodeSource {
this.entry = entry;
}
public NodeSource(MasterSlaveEntry entry, Integer slot) {
this.entry = entry;
this.slot = slot;
}
public NodeSource(MasterSlaveEntry entry, RedisClient redisClient) {
this.entry = entry;
this.redisClient = redisClient;

Loading…
Cancel
Save