|
|
|
@ -718,8 +718,10 @@ public class ClusterConnectionManager extends MasterSlaveConnectionManager {
|
|
|
|
|
int start = indexOf(key, (byte) '{');
|
|
|
|
|
if (start != -1) {
|
|
|
|
|
int end = indexOf(key, (byte) '}');
|
|
|
|
|
if (end != -1 && start + 1 < end) {
|
|
|
|
|
key = Arrays.copyOfRange(key, start + 1, end);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int result = CRC16.crc16(key) % MAX_SLOT;
|
|
|
|
|
return result;
|
|
|
|
@ -734,8 +736,10 @@ public class ClusterConnectionManager extends MasterSlaveConnectionManager {
|
|
|
|
|
int start = key.indexOf('{');
|
|
|
|
|
if (start != -1) {
|
|
|
|
|
int end = key.indexOf('}');
|
|
|
|
|
if (end != -1 && start + 1 < end) {
|
|
|
|
|
key = key.substring(start + 1, end);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int result = CRC16.crc16(key.getBytes()) % MAX_SLOT;
|
|
|
|
|
log.debug("slot {} for {}", result, key);
|
|
|
|
|