From 26d7e186fd1878683f1c5643306b6c73ab2e2b37 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 6c8972fb47f..61c85ba6fbd 100644 --- a/pkg/mcs/scheduling/server/cluster.go +++ b/pkg/mcs/scheduling/server/cluster.go @@ -261,7 +261,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 c32adac16d5..8cd5567b75c 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