Skip to content

Commit

Permalink
crosscluster/physical: use correct lag replan cluster setting
Browse files Browse the repository at this point in the history
Previously the `stream_replication.replan_flow_frequency` setting determined
the frequency that the frontier processor checked for lagging nodes, not the
`stream_replication.lag_check_frequency` setting, as intended. The latter
didn't control anything. This patch fixes this.

Epic: none
Release note: none
  • Loading branch information
msbutler committed Sep 19, 2024
1 parent a0e709a commit 94730d7
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,7 @@ func (sf *streamIngestionFrontier) maybePersistFrontierEntries() error {

func (sf *streamIngestionFrontier) maybeCheckForLaggingNodes() error {
ctx := sf.Ctx()

// We halve the frequency relative to the ReplanFrequency setting (i.e.
// check twice as often), because the node lag checker will only restart the
// distSQL plan if a node is lagging for 2 checks in a row.
checkFreq := crosscluster.ReplanFrequency.Get(&sf.FlowCtx.Cfg.Settings.SV) / 2
checkFreq := crosscluster.LagCheckFrequency.Get(&sf.FlowCtx.Cfg.Settings.SV)
maxLag := crosscluster.InterNodeLag.Get(&sf.FlowCtx.Cfg.Settings.SV)
if sf.persistedReplicatedTime.IsEmpty() {
log.VEvent(ctx, 2, "skipping lag replanning check: no persisted replicated time")
Expand Down

0 comments on commit 94730d7

Please sign in to comment.