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 <exceptionfactory@apache.org>
This commit is contained in:
Mark Payne 2023-07-20 12:12:01 -04:00 committed by exceptionfactory
parent 20b19992d2
commit 8f5392dd11
No known key found for this signature in database
GPG Key ID: 29B6A52D2AAE8DBA

View File

@ -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;
}
}