Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

scheduler: use pause instead of remove schedulers #551

Merged
merged 12 commits into from
Oct 15, 2020
Prev Previous commit
fix ci test
  • Loading branch information
3pointer committed Oct 15, 2020
commit ec2a7a4c5b4c31912c1f735898f71df595883a7e
5 changes: 3 additions & 2 deletions pkg/pdutil/pd.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,13 @@ func (p *PdController) resumeSchedulerWith(ctx context.Context, schedulers []str
}
}
if err != nil {
log.Error("failed to resume scheduler after retry, you may reset this scheduler manually",
zap.String("scheduler", scheduler))
log.Error("failed to resume scheduler after retry, you may reset this scheduler manually"+
"or just wait this scheduler pause timeout", zap.String("scheduler", scheduler))
} else {
log.Info("resume scheduler successful", zap.String("scheduler", scheduler))
}
}
// no need to return error, because the pause will timeout.
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/pdutil/pd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (s *testPDControllerSuite) TestScheduler(c *C) {
<-schedulerPauseCh
}()
err = pdController.resumeSchedulerWith(ctx, []string{scheduler}, mock)
c.Assert(err, ErrorMatches, "failed")
c.Assert(err, IsNil)

_, err = pdController.listSchedulersWith(ctx, mock)
c.Assert(err, ErrorMatches, "failed")
Expand Down