Github user ijokarumawak commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2361#discussion_r159117995
  
    --- Diff: 
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/ListS3.java
 ---
    @@ -264,18 +265,19 @@ public void onTrigger(final ProcessContext context, 
final ProcessSession session
                 }
                 bucketLister.setNextMarker();
     
    +            totalListCount += listCount;
                 commit(context, session, listCount);
                 listCount = 0;
             } while (bucketLister.isTruncated());
    +
    +        // Update stateManger with the most recent timestamp
             currentTimestamp = maxTimestamp;
    +        persistState(context);
    --- End diff --
    
    These two lines of code can be embedded in `commit` method.
    ```
             // Update stateManger with the most recent timestamp
             currentTimestamp = maxTimestamp;
             persistState(context);
    ```


---

Reply via email to