exceptionfactory commented on PR #10136:
URL: https://github.com/apache/nifi/pull/10136#issuecomment-3119298265

   Thanks for the reply @tpalfy.
   
   Regarding the `getFlowFileFilter()` method calls, I was referring to this:
   
   ```
   final FlowFileFilter batchingDbcpServiceFlowFileFilter = 
dbcpService.getFlowFileFilter(batchSize);
   final FlowFileFilter nonbatchingDbcpServiceFlowFileFilter = 
dbcpService.getFlowFileFilter();
   ```
   
   I believe only the first one is needed, as is currently used.
   
   Regarding where to make changes, yes, keeping `PutSQL` unchanged, but 
changing `DBConnectionPoolLookup` seems like the right place to make 
improvements.
   
   I see the current behavior is to throw a `ProcessException` if the 
`database.name` attribute is missing. That appears to be wrong, as mentioned, 
given that a `FlowFileFilter` should not throw exceptions. As you noted, 
returning `REJECT_AND_CONTINUE` keeps the FlowFile in the queue indefinitely. 
However, that seems like the correct behavior, because it indicates a flow 
design problem. To handle this, a `RouteOnAttribute` to check for the presence 
of `database.name` seems appropriate. This would align with existing behavior 
in cases where the value of `database.name` does not match with one of the 
configured values in the `DBCPConnectionLookup` service.
   
   I would be supportive of making those changes in the 
`DBCPConnectionPoolLookup.getFlowFileFilter()`.


-- 
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