From acc28bf1e8f0cc3b86e34fc61e0bbcd4f8b5080a Mon Sep 17 00:00:00 2001 From: HunDunDM Date: Mon, 16 Aug 2021 17:14:06 +0800 Subject: [PATCH] tiny fix Signed-off-by: HunDunDM --- 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 7ae6f061e65..9cc682ba782 100644 --- a/server/cluster/cluster.go +++ b/server/cluster/cluster.go @@ -555,7 +555,7 @@ func (c *RaftCluster) processRegionHeartbeat(region *core.RegionInfo) error { // Save to cache if meta or leader is updated, or contains any down/pending peer. // Mark isNew if the region in cache does not have leader. isNew, saveKV, saveCache, needSync := regionGuide(region, origin, c.traceRegionFlow) - if !saveKV && !saveCache && !isNew { + if len(writeItems) == 0 && len(readItems) == 0 && !saveKV && !saveCache && !isNew { return nil }