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 27, 2024
1 parent 08418a5 commit 057d6d8
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -538,11 +538,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 := streamingccl.ReplanFrequency.Get(&sf.FlowCtx.Cfg.Settings.SV) / 2
checkFreq := streamingccl.LagCheckFrequency.Get(&sf.FlowCtx.Cfg.Settings.SV)
maxLag := streamingccl.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 057d6d8

Please sign in to comment.