From f5f0512890ae8d138c396608b5fe773a698581db Mon Sep 17 00:00:00 2001 From: Andrei Matei Date: Thu, 4 Feb 2021 13:52:01 -0500 Subject: [PATCH] kvserver: fix the log tag on split Make the initial lease application on the RHS after a split reflect the fact that it's executing in the context of the RHS, not the LHS. Release note: None --- pkg/kv/kvserver/store_split.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/kv/kvserver/store_split.go b/pkg/kv/kvserver/store_split.go index 2294ca8ecd90..97ac609be6dd 100644 --- a/pkg/kv/kvserver/store_split.go +++ b/pkg/kv/kvserver/store_split.go @@ -235,7 +235,8 @@ func prepareRightReplicaForSplit( // Invoke the leasePostApplyLocked method to ensure we properly initialize // the replica according to whether it holds the lease. This enables the // txnWaitQueue. - rightRepl.leasePostApplyLocked(ctx, + rhsCtx := rightRepl.AnnotateCtx(ctx) + rightRepl.leasePostApplyLocked(rhsCtx, rightRepl.mu.state.Lease, /* prevLease */ rightRepl.mu.state.Lease, /* newLease - same as prevLease */ nil, /* priorReadSum */