From a2ecfe3355f1ac75285e42d3f34bb9761723cc5b Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Mon, 5 Jan 2015 15:36:40 -0500 Subject: [PATCH] NIFI-226: when pre-fetching FlowFiles from queue, if a FlowFile is penalized, it is lost --- .../java/org/apache/nifi/controller/StandardFlowFileQueue.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java index 3b880bb50f..59d230881f 100644 --- a/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java +++ b/nar-bundles/framework-bundle/framework/core-api/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java @@ -1011,6 +1011,9 @@ public final class StandardFlowFileQueue implements FlowFileQueue { if (record == null || record.isPenalized()) { // not enough unpenalized records to pull. Put all records back and return activeQueue.addAll(buffer); + if ( record != null ) { + activeQueue.add(record); + } return; } else { buffer.add(record);