Skip to content

Commit 1d1a912

Browse files
committed
allocator: remove log.VEventf for alive stores in isStoreReadyForRoutineReplicaTransferInternal
When investigating an allocator simulator test, we observed a significant amount of time spent by `log.VEventf`, consuming 64% of time (according to pprof CPU analysis). This was mainly caused by `rankedCandidateListForRebalancing` repeatedly calling `IsStoreReadyForRoutineReplicaTransfer` on all stores that pass the `StoreFilterThrottled` filter. As a temporary mitigation, we deleted `log.VEventf` in `isStoreReadyForRoutineReplicaTransferInternal` for less interesting cases where stores are alive. However, our longer term strategy is to buffer such outputs in the allocator at a higher level to reduce `log.VEventf` calls. Related: cockroachdb#107421 Release note: None
1 parent 65cc261 commit 1d1a912

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

pkg/kv/kvserver/allocator/storepool/store_pool.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,8 +1312,6 @@ func (sp *StorePool) isStoreReadyForRoutineReplicaTransferInternal(
13121312
}
13131313
switch status {
13141314
case storeStatusThrottled, storeStatusAvailable:
1315-
log.VEventf(ctx, 3,
1316-
"s%d is a live target, candidate for rebalancing", targetStoreID)
13171315
return true
13181316
case storeStatusDead, storeStatusUnknown, storeStatusDecommissioning, storeStatusSuspect, storeStatusDraining:
13191317
log.VEventf(ctx, 3,

0 commit comments

Comments
 (0)