Skip to content

NIFI-4028 - fix cache update when Wait releases flow files#2055

Closed
pvillard31 wants to merge 2 commits intoapache:masterfrom
pvillard31:NIFI-4028
Closed

NIFI-4028 - fix cache update when Wait releases flow files#2055
pvillard31 wants to merge 2 commits intoapache:masterfrom
pvillard31:NIFI-4028

Conversation

@pvillard31
Copy link
Copy Markdown
Contributor

@pvillard31 pvillard31 commented Aug 3, 2017

Thank you for submitting a contribution to Apache NiFi.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically master)?

  • Is your initial contribution a single, squashed commit?

For code changes:

  • Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
  • Have you written or updated unit tests to verify your changes?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
  • If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
  • If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

@ijokarumawak
Copy link
Copy Markdown
Member

Hi @pvillard31 , thanks for tackling this! Although the proposed change can keep a signal when there are counts remaining, I found that:

  • Current implementation of Wait and WaitNotifyProtocal are already complex, and adding another execution branch would make it more complex, and hard to maintain
  • Calling WaitNotifyProtocol.notify method from Wait is not expected by design.

So, I'd like to propose different approach, that refactors and consolidates current implementation so that Wait processor has less different execution paths in its code. That would be more understandable for developers and users. Would you take a look at this commit? This branch has 1 more commit based on this PR:
ijokarumawak@9bc38bb
If it looks reasonable, please add it to your PR.

- Consolidated implementation for the cases of releasableFlowCount is 1 or more, in order to reduce complexity and behavior differences
- Added 'consumed' counter when total counter is used to release incoming FlowFiles
- Fixed method name typo, releaseCandidates
@pvillard31
Copy link
Copy Markdown
Contributor Author

Thanks @ijokarumawak for your review and work, that's much cleaner with your commit. I just added it to this PR.

@ijokarumawak
Copy link
Copy Markdown
Member

@pvillard31 Local contrib check passed without issue, and tested with different flows. LGTM +1, merging to master. Thanks!

@asfgit asfgit closed this in c1b99d5 Aug 17, 2017
pvillard31 added a commit to pvillard31/nifi that referenced this pull request Jan 3, 2019
NIFI-4028: Refactored Wait processor.

- Consolidated implementation for the cases of releasableFlowCount is 1 or more, in order to reduce complexity and behavior differences
- Added 'consumed' counter when total counter is used to release incoming FlowFiles
- Fixed method name typo, releaseCandidates

This closes apache#2055.

Signed-off-by: Koji Kawamura <ijokarumawak@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants