Github user mattyb149 commented on the issue:

    https://github.com/apache/nifi/pull/1658
  
    I tried the following use case:
    
    - 3 FlowFiles containing SQL, the first two INSERT the same value (meaning 
the second will fail), then third INSERTing a new value
    - PutSQL with Supports Fragmented Transactions set to `true` (with no 
fragment.* attributes set) and Batch Size 1
    
    I was pleasantly surprised to see that even the first successful statement 
was rolled back when the second one failed. This was because all 3 flow files 
were already in the queue, and using Supports Fragmented Transactions without 
the fragment attributes set will cause the `TransactionalFlowFileFilter` to 
grab all the flow files (even though the Batch Size is 1). That is existing 
behavior (although not documented). We can't count on that though, because we 
don't know how many files will be in the queue when `pollFlowFiles()` is called.
    
    However, when I set Supports Fragmented Transactions to `false` with a 
Batch Size of 1, then the first and third flow files (the valid ones) were both 
processed successfully, and the second flow file was retained in the queue. I 
would've expected after the second file failed, the third one would not be 
processed. What are your thoughts? Did I configure it incorrectly?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to