Skip to content

Commit

Permalink
br: Change default check point lag limit (#51906) (#52570)
Browse files Browse the repository at this point in the history
ref #50803
  • Loading branch information
ti-chi-bot authored Apr 18, 2024
1 parent afb5e40 commit 8c70886
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion br/pkg/streamhelper/config/advancer_conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ const (
flagFullScanDiffTick = "full-scan-tick"
flagAdvancingByCache = "advancing-by-cache"
flagTryAdvanceThreshold = "try-advance-threshold"
flagCheckPointLagLimit = "check-point-lag-limit"

DefaultConsistencyCheckTick = 5
DefaultTryAdvanceThreshold = 4 * time.Minute
DefaultCheckPointLagLimit = 0
DefaultCheckPointLagLimit = 48 * time.Hour
DefaultBackOffTime = 5 * time.Second
DefaultTickInterval = 12 * time.Second
DefaultFullScanTick = 4
Expand Down Expand Up @@ -46,6 +47,8 @@ func DefineFlagsForCheckpointAdvancerConfig(f *pflag.FlagSet) {
"From how long we trigger the tick (advancing the checkpoint).")
f.Duration(flagTryAdvanceThreshold, DefaultTryAdvanceThreshold,
"If the checkpoint lag is greater than how long, we would try to poll TiKV for checkpoints.")
f.Duration(flagCheckPointLagLimit, DefaultCheckPointLagLimit,
"The maximum lag could be tolerated for the checkpoint lag.")
}

func Default() Config {
Expand All @@ -71,6 +74,10 @@ func (conf *Config) GetFromFlags(f *pflag.FlagSet) error {
if err != nil {
return err
}
conf.CheckPointLagLimit, err = f.GetDuration(flagCheckPointLagLimit)
if err != nil {
return err
}
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion br/pkg/task/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ var (
StreamStatus = "log status"
StreamTruncate = "log truncate"
StreamMetadata = "log metadata"
StreamCtl = "log ctl"
StreamCtl = "log advancer"

skipSummaryCommandList = map[string]struct{}{
StreamStatus: {},
Expand Down

0 comments on commit 8c70886

Please sign in to comment.