From 14bc229e5e9398ae50dc0c946ff1f9586cea979d Mon Sep 17 00:00:00 2001 From: disksing Date: Tue, 17 Apr 2018 10:25:24 +0800 Subject: [PATCH] server: skip check a region if there is already a pending operator. --- server/coordinator.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/coordinator.go b/server/coordinator.go index 62a61b6270a..d80798b5b0f 100644 --- a/server/coordinator.go +++ b/server/coordinator.go @@ -151,6 +151,11 @@ func (c *coordinator) patrolRegions() { } for _, region := range regions { + // Skip the region if there is already a pending operator. + if c.getOperator(region.GetId()) != nil { + continue + } + key = region.GetEndKey() if op := c.namespaceChecker.Check(region); op != nil {