checkSlotsCoverage is true by default.

pull/2563/head
Nikita Koksharov 5 years ago
parent 7bf7e52906
commit b7fdb7cc7c

@ -155,9 +155,9 @@ public class ClusterConnectionManager extends MasterSlaveConnectionManager {
if (cfg.isCheckSlotsCoverage() && lastPartitions.size() != MAX_SLOT) {
stopThreads();
if (failedMasters.isEmpty()) {
throw new RedisConnectionException("Not all slots covered! Only " + lastPartitions.size() + " slots are available", lastException);
throw new RedisConnectionException("Not all slots covered! Only " + lastPartitions.size() + " slots are available. Set checkSlotsCoverage = false to avoid this check.", lastException);
} else {
throw new RedisConnectionException("Not all slots covered! Only " + lastPartitions.size() + " slots are available. Failed masters according to cluster status: " + failedMasters, lastException);
throw new RedisConnectionException("Not all slots covered! Only " + lastPartitions.size() + " slots are available. Set checkSlotsCoverage = false to avoid this check. Failed masters according to cluster status: " + failedMasters, lastException);
}
}

@ -43,7 +43,7 @@ public class ClusterServersConfig extends BaseMasterSlaveServersConfig<ClusterSe
*/
private int scanInterval = 5000;
private boolean checkSlotsCoverage;
private boolean checkSlotsCoverage = true;
public ClusterServersConfig() {
}

Loading…
Cancel
Save