From 313d67dd2b2481cf443083de9df076796b6e024c Mon Sep 17 00:00:00 2001 From: Nikita Koksharov Date: Mon, 12 Jul 2021 13:31:50 +0300 Subject: [PATCH] Fixed - Batch in REDIS_WRITE_ATOMIC mode doesn't respect batch settings. --- .../redisson/command/BaseRedisBatchExecutor.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/redisson/src/main/java/org/redisson/command/BaseRedisBatchExecutor.java b/redisson/src/main/java/org/redisson/command/BaseRedisBatchExecutor.java index 3607a671e..da410ce49 100644 --- a/redisson/src/main/java/org/redisson/command/BaseRedisBatchExecutor.java +++ b/redisson/src/main/java/org/redisson/command/BaseRedisBatchExecutor.java @@ -58,6 +58,19 @@ public class BaseRedisBatchExecutor extends RedisExecutor { this.options = options; this.index = index; this.executed = executed; + + if (options.getRetryAttempts() > 0) { + this.attempts = options.getRetryAttempts(); + } + if (options.getRetryInterval() > 0) { + this.retryInterval = options.getRetryInterval(); + } + if (options.getResponseTimeout() > 0) { + this.responseTimeout = options.getResponseTimeout(); + } + if (options.getSyncSlaves() > 0) { + this.responseTimeout += options.getSyncTimeout(); + } } protected final MasterSlaveEntry getEntry(NodeSource source) {