ottobackwards commented on a change in pull request #257:
URL: https://github.com/apache/plc4x/pull/257#discussion_r695035466



##########
File path: 
plc4j/integrations/apache-nifi/nifi-plc4x-processors/src/main/java/org/apache/plc4x/nifi/Plc4xSourceRecordProcessor.java
##########
@@ -180,18 +202,18 @@ public void onTrigger(final ProcessContext context, final 
ProcessSession session
                        } else {
                                
session.getProvenanceReporter().receive(resultSetFF, "Retrieved " + 
nrOfRows.get() + " rows", executionTimeElapsed);
                        }
-                       resultSetFlowFiles.add(resultSetFF);
-                       if (resultSetFlowFiles.size() >= 0) {
-                               session.transfer(resultSetFlowFiles, 
BasePlc4xProcessor.REL_SUCCESS);
-                               // Need to remove the original input file if it 
exists
-                               if (fileToProcess != null) {
-                                       session.remove(fileToProcess);
-                                       fileToProcess = null;
-                               }
-                               session.commit();
-                               resultSetFlowFiles.clear();
+                       
+                       session.transfer(resultSetFF, 
BasePlc4xProcessor.REL_SUCCESS);
+                       // Need to remove the original input file if it exists
+                       if (fileToProcess != null) {
+                               session.remove(fileToProcess);
+                               fileToProcess = null;
                        }

Review comment:
       session.commit() is very much deprecated in the latest Nifi `1.14.0`.
   I think we should target that version if possible.
   `commitAsync()` should be used instead.
   see: https://github.com/apache/nifi/pull/5042




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to