Skip to content

Commit d85334a

Browse files
committed
change
1 parent b111f62 commit d85334a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/owner/manager.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,13 +381,15 @@ func (m *ownerManager) campaignLoop(campaignContext context.Context) {
381381
logutil.Logger(logCtx).Info("break campaign loop, refresh session failed", zap.Error(err2))
382382
return
383383
}
384+
err = nil
384385
case <-leaseNotFoundCh:
385386
logutil.Logger(logCtx).Info("meet lease not found error, refresh session")
386387
if err2 := m.refreshSession(util2.NewSessionRetryUnlimited, ManagerSessionTTL); err2 != nil {
387388
logutil.Logger(logCtx).Info("break campaign loop, refresh session failed", zap.Error(err2))
388389
return
389390
}
390391
leaseNotFoundCh = make(chan struct{})
392+
err = nil
391393
case <-campaignContext.Done():
392394
failpoint.Inject("MockDelOwnerKey", func(v failpoint.Value) {
393395
if v.(string) == "delOwnerKeyAndNotOwner" {
@@ -404,7 +406,6 @@ func (m *ownerManager) campaignLoop(campaignContext context.Context) {
404406
// In this time if we do the campaign operation, the etcd server will return ErrLeaseNotFound.
405407
if terror.ErrorEqual(err, rpctypes.ErrLeaseNotFound) {
406408
close(leaseNotFoundCh)
407-
err = nil
408409
continue
409410
}
410411

0 commit comments

Comments
 (0)