From 4548f61db95d0877cafee5be50b29fa8cc072b41 Mon Sep 17 00:00:00 2001 From: qupeng Date: Fri, 24 Jul 2020 06:29:25 +0000 Subject: [PATCH] fix conflicts Signed-off-by: qupeng --- go.sum | 1 + store/tikv/region_request.go | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/go.sum b/go.sum index 1257fa8b60e9d..0c86bf2c88151 100644 --- a/go.sum +++ b/go.sum @@ -186,6 +186,7 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d h1:GoAlyOgbOEIFd github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/remyoudompheng/bigfft v0.0.0-20190512091148-babf20351dd7 h1:FUL3b97ZY2EPqg2NbXKuMHs5pXJB9hjj1fDHnF2vl28= github.com/remyoudompheng/bigfft v0.0.0-20190512091148-babf20351dd7/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/sergi/go-diff v1.0.1-0.20180205163309-da645544ed44 h1:tB9NOR21++IjLyVx3/PCPhWMwqGNCMQEH96A6dMZ/gc= github.com/sergi/go-diff v1.0.1-0.20180205163309-da645544ed44/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shirou/gopsutil v2.18.10+incompatible h1:cy84jW6EVRPa5g9HAHrlbxMSIjBhDSX0OFYyMYminYs= github.com/shirou/gopsutil v2.18.10+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= diff --git a/store/tikv/region_request.go b/store/tikv/region_request.go index e274c43563019..1cdf91ebbb5c8 100644 --- a/store/tikv/region_request.go +++ b/store/tikv/region_request.go @@ -267,25 +267,17 @@ func (s *RegionRequestSender) onRegionError(bo *Backoffer, ctx *RPCContext, regi zap.String("ctx", ctx.String())) s.regionCache.UpdateLeader(ctx.Region, notLeader.GetLeader().GetStoreId(), ctx.PeerIdx) -<<<<<<< HEAD var boType backoffType if notLeader.GetLeader() != nil { boType = BoUpdateLeader -======= - if notLeader.GetLeader() == nil { + } else { // The peer doesn't know who is the current leader. Generally it's because // the Raft group is in an election, but it's possible that the peer is // isolated and removed from the Raft group. So it's necessary to reload // the region from PD. s.regionCache.InvalidateCachedRegion(ctx.Region) - if err = bo.Backoff(BoRegionMiss, errors.Errorf("not leader: %v, ctx: %v", notLeader, ctx)); err != nil { - return false, errors.Trace(err) - } ->>>>>>> 07bd4dd... region_cache: invalidate cached region for not leader error (#18577) - } else { boType = BoRegionMiss } - if err = bo.Backoff(boType, errors.Errorf("not leader: %v, ctx: %v", notLeader, ctx)); err != nil { return false, errors.Trace(err) }