From 4b988215bf2b117c740aa3fdbc265b1e47937078 Mon Sep 17 00:00:00 2001 From: Austen McClernon Date: Fri, 14 Oct 2022 17:07:05 +0000 Subject: [PATCH] kvserver: reduce log verbosity in lease score This patch reduces the logging verbosity in the allocator, in order to avoid flooding distribution logs. Specifically, the lease transfer score fn is called for every existing replica of a range. This in turn is called for every range that is processed in the replicate queue, from maybeTransferLease. As it logged as `VInfo`, it made up the majority of logging. This patch changes the log verbosity to `VEvent` 2. resolves: #89898 Release note: None --- pkg/kv/kvserver/allocator/allocatorimpl/allocator.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/kv/kvserver/allocator/allocatorimpl/allocator.go b/pkg/kv/kvserver/allocator/allocatorimpl/allocator.go index 8aaae5cd77eb..ef5fc01db03d 100644 --- a/pkg/kv/kvserver/allocator/allocatorimpl/allocator.go +++ b/pkg/kv/kvserver/allocator/allocatorimpl/allocator.go @@ -2206,7 +2206,9 @@ func loadBasedLeaseRebalanceScore( underfullScore := underfullLeaseThreshold - remoteStore.Capacity.LeaseCount totalScore := overfullScore + underfullScore - log.KvDistribution.Infof(ctx, + log.KvDistribution.VEventf( + ctx, + 2, "node: %d, sourceWeight: %.2f, remoteWeight: %.2f, remoteLatency: %v, "+ "rebalanceThreshold: %.2f, meanLeases: %.2f, sourceLeaseCount: %d, overfullThreshold: %d, "+ "remoteLeaseCount: %d, underfullThreshold: %d, totalScore: %d",