diff --git a/tidal-server/src/cluster/election_driver.rs b/tidal-server/src/cluster/election_driver.rs index 44e9961..e49ea4b 100644 --- a/tidal-server/src/cluster/election_driver.rs +++ b/tidal-server/src/cluster/election_driver.rs @@ -904,6 +904,16 @@ pub fn start( // bounded grace elapses. A cheap no-op when nothing is pending // (only the leader arms a grace, on a remove verb). node.poll_deferred_retires(); + // Refresh the frontier pair (flushed high-water mark + + // quorum commit index) on the tick, for the same reason + // m12p5 seeds the lag gauge from the heartbeat: the tick + // flows even when no writes do. Publishing only on a + // satisfied `ack=quorum` wait left both gauges at 0 for + // the whole life of an `ack=leader` workload while + // `/cluster/status` reported a live commit index. Two + // relaxed stores, throttled by nothing — cheaper than the + // breaker refresh above. + node.set_frontier_gauges(); } } tracing::info!("election driver stopped"); diff --git a/tidal-server/src/cluster/node.rs b/tidal-server/src/cluster/node.rs index 086e69e..cff76df 100644 --- a/tidal-server/src/cluster/node.rs +++ b/tidal-server/src/cluster/node.rs @@ -1811,7 +1811,7 @@ impl ShardReplica { /// flushed frontier claimed the entire relay log as lag: on the fleet's /// three-voter cluster that read as 13.5M events behind and held /// `TidalDBClusterQuorumLag` critical while every region sat at lag 0. - fn set_frontier_gauges(&self) { + pub(crate) fn set_frontier_gauges(&self) { let flushed = self.ship_feed.flushed_seq(); let commit = if self.commit.needed_peers() == 0 { flushed