Skip to content

Commit 1576079

Browse files
committed
add logging
1 parent 3f2ed33 commit 1576079

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/kv/kvserver/queue.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,10 @@ func (bq *baseQueue) addInternal(
772772
// priority element, but it would require additional bookkeeping or a linear
773773
// scan.
774774
if pqLen := bq.mu.priorityQ.Len(); pqLen > bq.maxSize {
775-
bq.removeLocked(bq.mu.priorityQ.sl[pqLen-1])
775+
replicaItemToDrop := bq.mu.priorityQ.sl[pqLen-1]
776+
log.Dev.VInfof(ctx, 1, "dropping due to exceeding queue max size: priority=%0.3f, replica=%v",
777+
priority, replicaItemToDrop.replicaID)
778+
bq.removeLocked(replicaItemToDrop)
776779
}
777780
// Signal the processLoop that a replica has been added.
778781
select {

0 commit comments

Comments
 (0)