mirror of https://github.com/apache/nifi.git
NIFI-226: when pre-fetching FlowFiles from queue, if a FlowFile is penalized, it is lost
This commit is contained in:
parent
68b7ad78cc
commit
a2ecfe3355
|
@ -1011,6 +1011,9 @@ public final class StandardFlowFileQueue implements FlowFileQueue {
|
||||||
if (record == null || record.isPenalized()) {
|
if (record == null || record.isPenalized()) {
|
||||||
// not enough unpenalized records to pull. Put all records back and return
|
// not enough unpenalized records to pull. Put all records back and return
|
||||||
activeQueue.addAll(buffer);
|
activeQueue.addAll(buffer);
|
||||||
|
if ( record != null ) {
|
||||||
|
activeQueue.add(record);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
buffer.add(record);
|
buffer.add(record);
|
||||||
|
|
Loading…
Reference in New Issue