Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mcs: use a controller to manage scheduling jobs #7270

Merged
merged 11 commits into from
Nov 10, 2023
6 changes: 3 additions & 3 deletions pkg/schedule/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,6 @@ func (c *Coordinator) RunUntilStop() {
c.Run()
<-c.ctx.Done()
log.Info("coordinator is stopping")
c.GetSchedulersController().Wait()
c.wg.Wait()
log.Info("coordinator has been stopped")
}

// Run starts coordinator.
Expand Down Expand Up @@ -579,6 +576,9 @@ func (c *Coordinator) waitPluginUnload(pluginPath, schedulerName string, ch chan
// Stop stops the coordinator.
func (c *Coordinator) Stop() {
c.cancel()
c.GetSchedulersController().Wait()
c.wg.Wait()
log.Info("coordinator has been stopped")
}

// GetHotRegionsByType gets hot regions' statistics by RWType.
Expand Down
Loading