From 0dfaa08643aca5b732f2cd7932740f7d9122fe20 Mon Sep 17 00:00:00 2001 From: JmPotato Date: Thu, 14 Sep 2023 09:53:54 +0800 Subject: [PATCH] Address the comment Signed-off-by: JmPotato --- pkg/mcs/scheduling/server/cluster.go | 2 +- pkg/schedule/coordinator.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/mcs/scheduling/server/cluster.go b/pkg/mcs/scheduling/server/cluster.go index a8e4f46f28c7..dde3086f26f3 100644 --- a/pkg/mcs/scheduling/server/cluster.go +++ b/pkg/mcs/scheduling/server/cluster.go @@ -258,7 +258,7 @@ func (c *Cluster) waitSchedulersInitialized() { ticker := time.NewTicker(time.Millisecond * 100) defer ticker.Stop() for { - if c.coordinator.CheckSchedulersInitialized() { + if c.coordinator.AreSchedulersInitialized() { return } select { diff --git a/pkg/schedule/coordinator.go b/pkg/schedule/coordinator.go index c32adac16d56..8cd5567b75c5 100644 --- a/pkg/schedule/coordinator.go +++ b/pkg/schedule/coordinator.go @@ -117,8 +117,8 @@ func (c *Coordinator) markSchedulersInitialized() { c.schedulersInitialized = true } -// CheckSchedulersInitialized returns whether the schedulers have been initialized. -func (c *Coordinator) CheckSchedulersInitialized() bool { +// AreSchedulersInitialized returns whether the schedulers have been initialized. +func (c *Coordinator) AreSchedulersInitialized() bool { c.RLock() defer c.RUnlock() return c.schedulersInitialized