chihsuan commented on code in PR #10520:
URL: https://github.com/apache/ozone/pull/10520#discussion_r3419823736


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/ReconTaskControllerImpl.java:
##########
@@ -102,6 +103,9 @@ public class ReconTaskControllerImpl implements 
ReconTaskController {
   private AtomicLong lastRetryTimestamp = new AtomicLong(0);
   private static final int MAX_EVENT_PROCESS_RETRIES = 6;
   private static final long RETRY_DELAY_MS = 2000; // 2 seconds
+  // Time source for the retry-delay gate; overridable in tests via the
+  // @VisibleForTesting constructor to drive the gate with virtual time.
+  private LongSupplier timeSource = System::currentTimeMillis;

Review Comment:
   I used `LongSupplier` only to keep the seam minimal over the existing 
millis-based gate, but you're right that `Clock` + `TestClock` is the house 
convention and reads better. Switched in dbd036c. Thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to