Skip to content

Commit

Permalink
Merge #131038
Browse files Browse the repository at this point in the history
131038: crosscluster/physical: use correct lag replan cluster setting r=[azhu-crl](https://github.com/azhu-crl) a=msbutler

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

Co-authored-by: Michael Butler <[email protected]>
  • Loading branch information
craig[bot] and msbutler committed Sep 21, 2024
2 parents 3d2f17c + 94730d7 commit 83589fb
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 83589fb

Please sign in to comment.