This is an automated email from the ASF dual-hosted git repository.
markap14 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 6d00883742f NIFI-16370 Use non-fair locking in SwappablePriorityQueue
(#11698)
6d00883742f is described below
commit 6d00883742fa18847a14754cee8994ec487fd534
Author: Joe Witt <[email protected]>
AuthorDate: Sat Sep 19 13:11:18 2026 -0700
NIFI-16370 Use non-fair locking in SwappablePriorityQueue (#11698)
Co-authored-by: Cursor <[email protected]>
---
.../java/org/apache/nifi/controller/queue/SwappablePriorityQueue.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/SwappablePriorityQueue.java
b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/SwappablePriorityQueue.java
index 57f18cc7640..dee5c139bf5 100644
---
a/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/SwappablePriorityQueue.java
+++
b/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/SwappablePriorityQueue.java
@@ -107,7 +107,8 @@ public class SwappablePriorityQueue {
this.dropAction = dropAction;
this.swapPartitionName = swapPartitionName;
- final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true);
+ // FlowFile order is determined by QueuePrioritizer, so this lock does
not need fair ordering.
+ final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
readLock = new TimedLock(lock.readLock(),
flowFileQueue.getIdentifier() + " Read Lock", 100);
writeLock = new TimedLock(lock.writeLock(),
flowFileQueue.getIdentifier() + " Write Lock", 100);
}