Himanshu-g81 opened a new pull request, #2598:
URL: https://github.com/apache/phoenix/pull/2598
## Problem
The replay/forward round-eligibility gate is evaluated on the wall clock,
but PHOENIX-7813
aligned the scheduler wake — fired on the monotonic clock
(`System.nanoTime`) — to that boundary
with **zero margin**. Small nanoTime-vs-wall-clock drift can tip a wake
just below the boundary,
so the round isn't yet eligible and the region server loses a full (~60s)
cycle. Most damaging
during planned failover.
## Fix
Both changes live in the shared base class `ReplicationLogDiscovery`
(inherited by
`ReplicationLogDiscoveryReplay` and `ReplicationLogDiscoveryForwarder`):
1. **Epsilon margin** so the aligned wake lands just *after* the
eligibility boundary rather than
exactly on it. New config
`phoenix.replication.discovery.aligned.delay.epsilon.millis` (default `500`).
2. **Per-cycle re-anchor**: replace `scheduleAtFixedRate` with a
self-rescheduling one-shot that
recomputes the aligned delay every cycle, so drift can't accumulate.
Each cycle is bound to its
scheduler generation to avoid double-scheduling after a
`stop()`→`start()` restart.
--
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]