Github user ijokarumawak commented on the issue:

    https://github.com/apache/nifi/pull/2657
  
    Maybe I'm thinking the issue oversimplified, but changing the line 378 
`return` to `break` would address the issue while ensuring that we don't reset 
the flag until we know we've pulled the latest state, wouldn't it?
    
    ```
                         if (LATEST_LISTED_ENTRY_TIMESTAMP_KEY.equals(k)) {
                             minTimestampToListMillis = Long.parseLong(v);
                             // If our determined timestamp is the same as that 
of our last listing, skip this execution as there are no updates
                             if 
(minTimestampToListMillis.equals(this.lastListedLatestEntryTimestampMillis)) {
                                 context.yield();
                                 return; // How about changing this to 'break'?
                             } else {
                                 this.lastListedLatestEntryTimestampMillis = 
minTimestampToListMillis;
                             }
                         } else if 
(LAST_PROCESSED_LATEST_ENTRY_TIMESTAMP_KEY.equals(k)) {
                             this.lastProcessedLatestEntryTimestampMillis = 
Long.parseLong(v);
                         } else if (k.startsWith(IDENTIFIER_PREFIX)) {
                             latestIdentifiersProcessed.add(v);
                         }
    ```


---

Reply via email to