kvserver: fix the log tag on split#59813
kvserver: fix the log tag on split#59813andreimatei wants to merge 1 commit intocockroachdb:masterfrom
Conversation
nvb
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @andreimatei and @tbg)
pkg/kv/kvserver/store_split.go, line 278 at r1 (raw file):
rightRepl.mu.Lock() defer rightRepl.mu.Unlock() ctx = logtags.AddTag(ctx, "r", rightRepl.RangeID)
Can we use the RHS's AmbientContext for this?
3500a0a to
dbcac7a
Compare
andreimatei
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @nvanbenschoten and @tbg)
pkg/kv/kvserver/store_split.go, line 278 at r1 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Can we use the RHS's
AmbientContextfor this?
ya, done
nvb
left a comment
There was a problem hiding this comment.
Reviewed 1 of 2 files at r2.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @andreimatei and @tbg)
pkg/kv/kvserver/replica_proposal.go, line 306 at r2 (raw file):
ctx context.Context, newLease roachpb.Lease, permitJump bool, ) { ctx = r.AnnotateCtx(ctx)
Let's keep this in prepareRightReplicaForSplit. That's the only case where the context won't already be properly annotated.
pkg/kv/kvserver/store_split.go, line 278 at r1 (raw file):
Previously, andreimatei (Andrei Matei) wrote…
ya, done
Did you confirm that the AmbientContext can be used to overwrite an existing log tag?
dbcac7a to
1e05910
Compare
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
1e05910 to
f5f0512
Compare
andreimatei
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @nvanbenschoten)
pkg/kv/kvserver/store_split.go, line 278 at r1 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Did you confirm that the AmbientContext can be used to overwrite an existing log tag?
I did. This is also documented a few layers down, here
pkg/kv/kvserver/replica_proposal.go, line 306 at r2 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Let's keep this in
prepareRightReplicaForSplit. That's the only case where the context won't already be properly annotated.
done
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