Github user martin-mucha commented on a diff in the pull request: https://github.com/apache/nifi/pull/2425#discussion_r166457681 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ValidateRecord.java --- @@ -242,11 +279,12 @@ public void onTrigger(final ProcessContext context, final ProcessSession session final boolean allowExtraFields = context.getProperty(ALLOW_EXTRA_FIELDS).asBoolean(); final boolean strictTypeChecking = context.getProperty(STRICT_TYPE_CHECKING).asBoolean(); - RecordSetWriter validWriter = null; - RecordSetWriter invalidWriter = null; FlowFile validFlowFile = null; FlowFile invalidFlowFile = null; + final List<Record> validRecords = new LinkedList<>(); --- End diff -- Understood, but one question. I did all this refactoring to get rid of 'surprising' complexity of code. Now, if I do "writer.write(record);" given record won't be held in heap before completeFlowFile is called? Where is the FlowFile stored until 'completed'? If it's held outside of heap, then all this refactoring is invalid, indeed. If it's also in heap ...
---