From 3dd1a376651d5e19fa64e568684c66a6b75a1e76 Mon Sep 17 00:00:00 2001 From: Erik Grinaker Date: Tue, 20 Jun 2023 10:22:15 +0000 Subject: [PATCH] kvserver: use r-prefix for range IDs in quiescence logs Epic: none Release note: None --- pkg/kv/kvserver/replica_raft_quiesce.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/kv/kvserver/replica_raft_quiesce.go b/pkg/kv/kvserver/replica_raft_quiesce.go index e1a7313766c4..75c6b7b1c642 100644 --- a/pkg/kv/kvserver/replica_raft_quiesce.go +++ b/pkg/kv/kvserver/replica_raft_quiesce.go @@ -40,7 +40,7 @@ var raftDisableQuiescence = envutil.EnvOrDefaultBool("COCKROACH_DISABLE_QUIESCEN func (r *Replica) quiesceLocked(ctx context.Context, lagging laggingReplicaSet) { if !r.mu.quiescent { if log.V(3) { - log.Infof(ctx, "quiescing %d", r.RangeID) + log.Infof(ctx, "quiescing r%d", r.RangeID) } r.mu.quiescent = true r.mu.laggingFollowersOnQuiesce = lagging @@ -48,7 +48,7 @@ func (r *Replica) quiesceLocked(ctx context.Context, lagging laggingReplicaSet) delete(r.store.unquiescedReplicas.m, r.RangeID) r.store.unquiescedReplicas.Unlock() } else if log.V(4) { - log.Infof(ctx, "already quiesced") + log.Infof(ctx, "r%d already quiesced", r.RangeID) } } @@ -78,7 +78,7 @@ func (r *Replica) maybeUnquiesceLocked(wakeLeader, mayCampaign bool) bool { } ctx := r.AnnotateCtx(context.TODO()) if log.V(3) { - log.Infof(ctx, "unquiescing %d", r.RangeID) + log.Infof(ctx, "unquiescing r%d", r.RangeID) } r.mu.quiescent = false r.mu.laggingFollowersOnQuiesce = nil @@ -94,7 +94,7 @@ func (r *Replica) maybeUnquiesceLocked(wakeLeader, mayCampaign bool) bool { } else if st.RaftState == raft.StateFollower && wakeLeader { // Propose an empty command which will wake the leader. if log.V(3) { - log.Infof(ctx, "waking %d leader", r.RangeID) + log.Infof(ctx, "waking r%d leader", r.RangeID) } data := raftlog.EncodeRaftCommand(raftlog.EntryEncodingStandardWithoutAC, makeIDKey(), nil) _ = r.mu.internalRaftGroup.Propose(data)