Skip to content

Commit 6155338

Browse files
craig[bot]kvoli
andcommitted
107506: kvserver,allocator: minor log message improvements r=shralex a=kvoli `shouldTransferLeaseForAccessLocality` logs detailed information regarding the replica locality, QPS and request weighting. This information is not summarized. Bump to v=5, from v=1-v=2 to reduce vmodule enabled log noise. Rename replicate queue re-processing, to re-queuing. The replicate queue will re-queue, rather than immediately re-process a replica after a successful process. Epic: none Release note: None Co-authored-by: Austen McClernon <[email protected]>
2 parents 735077c + f94c892 commit 6155338

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/kv/kvserver/allocator/allocatorimpl/allocator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2635,7 +2635,7 @@ func (a Allocator) shouldTransferLeaseForAccessLocality(
26352635
}
26362636
}
26372637

2638-
log.KvDistribution.VEventf(ctx, 1,
2638+
log.KvDistribution.VEventf(ctx, 5,
26392639
"shouldTransferLease qpsStats: %+v, replicaLocalities: %+v, replicaWeights: %+v",
26402640
qpsStats, replicaLocalities, replicaWeights)
26412641
sourceWeight := math.Max(minReplicaWeight, replicaWeights[source.Node.NodeID])
@@ -2752,7 +2752,7 @@ func loadBasedLeaseRebalanceScore(
27522752

27532753
log.KvDistribution.VEventf(
27542754
ctx,
2755-
2,
2755+
5,
27562756
"node: %d, sourceWeight: %.2f, remoteWeight: %.2f, remoteLatency: %v, "+
27572757
"rebalanceThreshold: %.2f, meanLeases: %.2f, sourceLeaseCount: %d, overfullThreshold: %d, "+
27582758
"remoteLeaseCount: %d, underfullThreshold: %d, totalScore: %d",

pkg/kv/kvserver/replicate_queue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ func (rq *replicateQueue) process(
662662
}
663663

664664
if requeue {
665-
log.KvDistribution.VEventf(ctx, 1, "re-processing")
665+
log.KvDistribution.VEventf(ctx, 1, "re-queuing")
666666
rq.maybeAdd(ctx, repl, rq.store.Clock().NowAsClockTimestamp())
667667
}
668668
return true, nil

0 commit comments

Comments
 (0)