Github user mcgilman commented on the issue:

    https://github.com/apache/nifi/pull/1306
  
    Thanks for the updates. Continuing to follow up on the partial update... is 
there a reason that batchCount, batchSize, and batchDuration must be updated as 
a single unit? Should a user not but able to just set just one of them? It 
seems the logic in `StandardRemoteGroupPort` considers each field individually 
and each, if set, could allow for the termination of a transaction.
    
    ```
    if (maxBatchCount > 0 && flowFilesSent.size() >= maxBatchCount) {
      flowFile = null; // if maxBatchCount is set and current transaction 
exceeds, stop
    } else if (maxBatchBytes > 0 && bytesSent >= maxBatchBytes) {
      flowFile = null; // if maxBatchBytes is set and current transaction 
exceeds, stop
    } else if (sendingNanos >= maxBatchDuration) {
      flowFile = null; // if maxBatchDuration is set (default of 500 millis if 
not) and current transaction exceeds, stop
    } else {
      flowFile = session.get(); // continue the transaction
    }
    ```
    
    I don't see a reason to prevent setting just the batchSize for instance. I 
think this can accomplish by updating `StandardRemoteProcessGroupDAO` and 
treating each field independently. For instance in `updatePort(...)`
    
    ```
    if (isNotNull(batchCount)) {
      port.setBatchCount(batchCount);
    }
    if (isNotNull(batchSize)) {
      port.setBatchSize(batchSize);
    }
    if (isNotNull(batchDuration)) {
      port.setBatchDuration(batchDuration);
    }
    ```
    
    Please let me know if I'm missing something about why all of these fields 
must be updated in the same request. 
    
    Thanks again!


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