You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by mgaido91 <gi...@git.apache.org> on 2018/05/17 07:50:52 UTC
[GitHub] nifi pull request #2657: NIFI-5109 Reset justElectedPrimaryNode flag right a...
Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2657#discussion_r188866746
--- Diff: nifi-nar-bundles/nifi-extension-utils/nifi-processor-utils/src/main/java/org/apache/nifi/processor/util/list/AbstractListProcessor.java ---
@@ -375,7 +375,7 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
// 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;
+ break;
--- End diff --
sorry, I just realize that now, with this fix we are performing an extra listing which is not needed. Maybe it is better to just have return as before, but prepend a `justElectedPrimaryNode = false;`. So I am thinking of substituting this line with:
```
justElectedPrimaryNode = false;
return;
```
what do you think @ijokarumawak @joewitt @viazovskyi ?
Thanks
---