From 4c5901637d9ef9a42d27fff530ceede950d359f6 Mon Sep 17 00:00:00 2001 From: lhy1024 Date: Mon, 22 Apr 2024 16:05:00 +0800 Subject: [PATCH] fix Signed-off-by: lhy1024 --- pkg/cache/priority_queue.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/cache/priority_queue.go b/pkg/cache/priority_queue.go index c46a4dd768c9..31a0ee77f62c 100644 --- a/pkg/cache/priority_queue.go +++ b/pkg/cache/priority_queue.go @@ -58,7 +58,9 @@ func (pq *PriorityQueue) Put(priority int, value PriorityQueueItem) bool { if !found || !min.Less(entry) { return false } + pq.mutex.Unlock() pq.Remove(min.Value.ID()) + pq.mutex.Lock() } } else if entry.Priority != priority { // delete before update pq.btree.Delete(entry)