Skip to content

Commit

Permalink
log-backup: do not resolve locks frequently when log-backup task did …
Browse files Browse the repository at this point in the history
  • Loading branch information
3pointer committed Jan 23, 2023
1 parent d6f633c commit 9161452
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions store/gcworker/gc_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ type GCWorker struct {
batchResolveLocks func(locks []*txnlock.Lock, regionID tikv.RegionVerID, safepoint uint64) (ok bool, err error)
resolveLocks func(locks []*txnlock.Lock, lowResolutionTS uint64) (int64, error)
}
logBackupEnabled bool
logBackupEnabled bool // check log-backup task existed.
}

// NewGCWorker creates a GCWorker instance.
Expand Down Expand Up @@ -1790,7 +1790,7 @@ func (w *GCWorker) checkLeader(ctx context.Context) (bool, error) {
se := createSession(w.store)
defer se.Close()

w.logBackupEnabled = utils.CheckLogBackupEnabled(se)
w.logBackupEnabled = utils.IsLogBackupInUse(se)
_, err := se.ExecuteInternal(ctx, "BEGIN")
if err != nil {
return false, errors.Trace(err)
Expand Down

0 comments on commit 9161452

Please sign in to comment.