Fixed - Node hasn't been discovered yet error isn't resolved by a new attempt for RBatch and RLock objects #4822

pull/4913/head
Nikita Koksharov 2 years ago
parent 63a8f98ec7
commit aabceeea77

@ -478,7 +478,12 @@ public class CommandBatchService extends CommandAsyncService {
AtomicInteger attempt = new AtomicInteger();
CompletableFuture<Map<MasterSlaveEntry, Entry>> resolvedEntriesFuture = new CompletableFuture<>();
resolveCommands(attempt, resolvedEntriesFuture);
resolvedEntriesFuture.thenAccept(map -> {
resolvedEntriesFuture.whenComplete((map, ee) -> {
if (ee != null) {
resultPromise.completeExceptionally(ee);
return;
}
List<CompletableFuture<Void>> futures = new ArrayList<>(map.size());
for (Map.Entry<MasterSlaveEntry, Entry> entry : aggregatedCommands.entrySet()) {
boolean isReadOnly = options.getExecutionMode() == ExecutionMode.REDIS_READ_ATOMIC;

Loading…
Cancel
Save