Skip to content

Commit

Permalink
log-backup: should set default value gc.ratio-threshold after pitr …
Browse files Browse the repository at this point in the history
…finished (#40141) (#40366)

close #40185
  • Loading branch information
ti-chi-bot authored Feb 14, 2023
1 parent ff2ed0d commit 7ecf793
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions br/pkg/task/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,12 @@ func KeepGcDisabled(g glue.Glue, store kv.Storage) (RestoreFunc, error) {
return nil, errors.Trace(err)
}

// If the oldRatio is negative, which is not normal status.
// It should set default value "1.1" after PiTR finished.
if strings.HasPrefix(oldRatio, "-") {
oldRatio = "1.1"
}

return func() error {
return utils.SetGcRatio(execCtx, oldRatio)
}, nil
Expand Down

0 comments on commit 7ecf793

Please sign in to comment.