Himanshu-g81 commented on code in PR #2598:
URL: https://github.com/apache/phoenix/pull/2598#discussion_r3789372037
##########
phoenix-core-server/src/main/java/org/apache/phoenix/replication/ReplicationLogDiscovery.java:
##########
@@ -196,6 +226,61 @@ public void stop() {
LOG.info("ReplicationLogDiscovery stopped for haGroup: {}", haGroupName);
}
+ /**
+ * Schedules the next replay as a single-shot task whose delay is recomputed
each cycle via
+ * {@link #computeAlignedInitialDelay()}. Recomputing every cycle re-pins
each wake-up to the
+ * wall-clock round-eligibility grid, correcting scheduler/wall-clock drift
instead of letting a
+ * one-time misalignment persist for the life of the process (which
fixed-rate scheduling does).
+ * All region servers still converge on the same grid, preserving
PHOENIX-7813's shared wake-up.
+ */
+ @GuardedBy("this")
+ protected void scheduleNextReplay() {
+ long delayMs = computeAlignedInitialDelay();
Review Comment:
Added [0, roundTimeMills) range validation plus a NumberFormatException
catch, clamping any bad value to the default with a one-shot WARN. Chose
clamp-over-reject because Math.floorMod already keeps the delay valid, so
throwing would only wedge the group in the ~60s supervisor-retry loop for a
benign misconfig.
--
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]