Fixed - Lock synced slaves check

pull/4385/head
Nikita Koksharov 3 years ago
parent 3ba3d543ea
commit 12af118675

@ -221,9 +221,9 @@ public abstract class RedissonBaseLock extends RedissonExpirable implements RLoc
throw new CompletionException(ex);
}
if (commandExecutor.getConnectionManager().getCfg().isCheckLockSyncedSlaves()
&& res.getSyncedSlaves() < availableSlaves) {
&& res.getSyncedSlaves() == 0 && availableSlaves > 0) {
throw new CompletionException(
new IllegalStateException("Only " + res.getSyncedSlaves() + " of " + availableSlaves + " slaves were synced"));
new IllegalStateException("None of slaves were synced"));
}
return commandExecutor.getNow(result.toCompletableFuture());

Loading…
Cancel
Save