This is an automated email from the ASF dual-hosted git repository.
exceptionfactory 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 8f5392dd11 NIFI-11837: When determining whether or not a queue should
exit 'swap mode' we need to look at the updated size of the queue after
migrating data from swapped queue to active queue. Previously, we were looking
at the size variable that was obtained from before the migration happened.
8f5392dd11 is described below
commit 8f5392dd114ab5daeed12c6792d8dd2eb75bc362
Author: Mark Payne <[email protected]>
AuthorDate: Thu Jul 20 12:12:01 2023 -0400
NIFI-11837: When determining whether or not a queue should exit 'swap mode'
we need to look at the updated size of the queue after migrating data from
swapped queue to active queue. Previously, we were looking at the size variable
that was obtained from before the migration happened.
This closes #7506
Signed-off-by: David Handermann <[email protected]>
---
.../java/org/apache/nifi/controller/queue/SwappablePriorityQueue.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/SwappablePriorityQueue.java
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/SwappablePriorityQueue.java
index bd5f270b97..dc7e816e74 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/SwappablePriorityQueue.java
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/SwappablePriorityQueue.java
@@ -346,7 +346,8 @@ public class SwappablePriorityQueue {
logger.debug("Migrated {} FlowFiles from swap queue to active
queue for {}", recordsMigrated, this);
}
- if (size.getSwappedCount() == 0) {
+ final FlowFileQueueSize updatedQueueSize = getFlowFileQueueSize();
+ if (updatedQueueSize.getSwappedCount() == 0) {
swapMode = false;
}
}