From 7f5ffa5c0e4c27a92f5a0e8b416ddfa6ae7f627c Mon Sep 17 00:00:00 2001 From: Austen McClernon Date: Wed, 2 Aug 2023 19:17:37 +0000 Subject: [PATCH] kvserver: always log store rebalancer transfers and relocates Previously, the store rebalancer would not default log range lease transfers or replica relocations, nor their estimated load impact. This made debugging imbalance related issues difficult. Bump the range relocation and range lease transfer log lines from `v(1)` to `Info`, so that they are always logged. Resolves: #107702 Release note: None --- pkg/kv/kvserver/store_rebalancer.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/kv/kvserver/store_rebalancer.go b/pkg/kv/kvserver/store_rebalancer.go index 8c2b3dd0d670..1ae6fc245ba6 100644 --- a/pkg/kv/kvserver/store_rebalancer.go +++ b/pkg/kv/kvserver/store_rebalancer.go @@ -655,9 +655,8 @@ func (sr *StoreRebalancer) applyRangeRebalance( voterTargets, nonVoterTargets []roachpb.ReplicationTarget, ) bool { descBeforeRebalance, _ := candidateReplica.DescAndSpanConfig() - log.KvDistribution.VEventf( + log.KvDistribution.Infof( ctx, - 1, "rebalancing r%d (%s load) to better balance load: voters from %v to %v; non-voters from %v to %v", candidateReplica.GetRangeID(), candidateReplica.RangeUsageInfo().Load(), @@ -800,9 +799,8 @@ func (sr *StoreRebalancer) chooseLeaseToTransfer( continue } if targetStore, ok := rctx.allStoresList.FindStoreByID(candidate.StoreID); ok { - log.KvDistribution.VEventf( + log.KvDistribution.Infof( ctx, - 1, "transferring lease for r%d load=%s to store s%d load=%s from local store s%d load=%s", desc.RangeID, candidateReplica.RangeUsageInfo().TransferImpact(),