diff --git a/engine-api/src/main/java/io/nosqlbench/engine/api/activityimpl/uniform/StandardAction.java b/engine-api/src/main/java/io/nosqlbench/engine/api/activityimpl/uniform/StandardAction.java index a9b61b51c..0e1612afd 100644 --- a/engine-api/src/main/java/io/nosqlbench/engine/api/activityimpl/uniform/StandardAction.java +++ b/engine-api/src/main/java/io/nosqlbench/engine/api/activityimpl/uniform/StandardAction.java @@ -53,11 +53,13 @@ public class StandardAction, R extends Op> impl private final Timer bindTimer; private final NBErrorHandler errorHandler; private final OpSequence> opsequence; + private final int maxTries; public StandardAction(A activity, int slot) { this.activity = activity; this.opsequence = activity.getOpSequence(); this.slot = slot; + this.maxTries = activity.getMaxTries(); bindTimer = activity.getInstrumentation().getOrCreateBindTimer(); executeTimer = activity.getInstrumentation().getOrCreateExecuteTimer(); triesHistogram = activity.getInstrumentation().getOrCreateTriesHistogram(); @@ -84,7 +86,7 @@ public class StandardAction, R extends Op> impl while (op != null) { int tries = 0; - while (tries++ <= activity.getMaxTries()) { + while (tries++ <= maxTries) { Throwable error = null; long startedAt = System.nanoTime();