Skip to content

Commit bc56b14

Browse files
committed
kvserver: remove priority reset during setProcessing
Previously, a replicaItem’s priority was cleared when marked as processing, to indicate it was no longer in the priority queue. This behavior made sense when the purgatory queue did not track priorities. However, we now need to preserve priorities for items in purgatory as well since they will be calling into baseQueue.processReplica. This commit removes the priority reset in replicaItem.SetProcessing(), ensuring that the enqueue time priority is retained when replicas are popped from the heap and passed into the purgatory queue properly. No behavior change should happen from this change.
1 parent f441e4b commit bc56b14

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

pkg/kv/kvserver/queue.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ type replicaItem struct {
137137

138138
// setProcessing moves the item from an enqueued state to a processing state.
139139
func (i *replicaItem) setProcessing() {
140-
i.priority = 0
141140
if i.index >= 0 {
142141
log.Fatalf(context.Background(),
143142
"r%d marked as processing but appears in prioQ", i.rangeID,

0 commit comments

Comments
 (0)