From a1e957d576766bbbbfc67c36d45f3fcc4505801d Mon Sep 17 00:00:00 2001 From: Yongbo Jiang Date: Tue, 9 Apr 2024 10:03:20 +0800 Subject: [PATCH] cluster: fix race when getting coordinator (#8037) close tikv/pd#8036 Signed-off-by: Cabinfever_B Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com> --- server/cluster/cluster.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/cluster/cluster.go b/server/cluster/cluster.go index 1a8de44b0bc..b11f1ff55a5 100644 --- a/server/cluster/cluster.go +++ b/server/cluster/cluster.go @@ -1940,7 +1940,7 @@ func (c *RaftCluster) updateProgress(storeID uint64, storeAddress, action string switch action { case removingAction: progressName = encodeRemovingProgressKey(storeID) - opts = []progress.Option{progress.WindowDurationOption(c.coordinator.GetPatrolRegionsDuration())} + opts = []progress.Option{progress.WindowDurationOption(c.GetCoordinator().GetPatrolRegionsDuration())} case preparingAction: progressName = encodePreparingProgressKey(storeID) }