From abfcd1cc68edd9d3cee15825a92ad26d7c30519f Mon Sep 17 00:00:00 2001 From: crazycs Date: Fri, 23 Feb 2024 17:05:38 +0800 Subject: [PATCH] Update internal/locate/replica_selector_test.go Co-authored-by: you06 --- internal/locate/replica_selector_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/locate/replica_selector_test.go b/internal/locate/replica_selector_test.go index c835f1a99..cde4921ce 100644 --- a/internal/locate/replica_selector_test.go +++ b/internal/locate/replica_selector_test.go @@ -442,7 +442,7 @@ func (tp RegionErrorType) Valid(addr string, req *tikvrpc.Request) bool { } } // replica-read. - if req.StaleRead == false && req.ReplicaRead == true { + if !req.StaleRead && req.ReplicaRead { switch tp { case NotLeaderErr, NotLeaderWithNewLeader1Err, NotLeaderWithNewLeader2Err, NotLeaderWithNewLeader3Err: // NotLeaderErr will not return in replica read.