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)

close #40185
  • Loading branch information
joccau authored Jan 6, 2023
1 parent 99100d4 commit 6477d2b
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 6477d2b

Please sign in to comment.