You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/10/06 10:35:06 UTC

[GitHub] [nifi] s9514171 opened a new pull request #5445: NIFI-9227 Run Once not working when scheduling strategy is CRON or Ev…

s9514171 opened a new pull request #5445:
URL: https://github.com/apache/nifi/pull/5445


   …ent driven
   
   <!--
     Licensed to the Apache Software Foundation (ASF) under one or more
     contributor license agreements.  See the NOTICE file distributed with
     this work for additional information regarding copyright ownership.
     The ASF licenses this file to You under the Apache License, Version 2.0
     (the "License"); you may not use this file except in compliance with
     the License.  You may obtain a copy of the License at
         http://www.apache.org/licenses/LICENSE-2.0
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
   -->
   
   #### Description of PR
   
   [https://issues.apache.org/jira/browse/NIFI-9227](https://issues.apache.org/jira/browse/NIFI-9227)
   
   This PR fix the thread hang after run once in CRON scheduling strategy and support run once when processor is set in Event Driven
   
   ### For all changes:
   - [X] Is there a JIRA ticket associated with this PR? Is it referenced 
        in the commit message?
   
   - [X] 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.
   
   - [X] Has your PR been rebased against the latest commit within the target branch (typically `main`)?
   
   - [X] Is your initial contribution a single, squashed commit? _Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not `squash` or use `--force` when pushing to allow for clean monitoring of changes._
   
   ### For code changes:
   - [X] Have you ensured that the full suite of tests is executed via `mvn -Pcontrib-check clean install` at the root `nifi` folder?
   - [X] Have you written or updated unit tests to verify your changes?
   - [X] Have you verified that the full build is successful on JDK 8?
   - [X] Have you verified that the full build is successful on JDK 11?
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] 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 GitHub Actions CI for build issues and submit an update to your PR as soon as possible.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] s9514171 commented on pull request #5445: NIFI-9227 Run Once not working when scheduling strategy is CRON or Ev…

Posted by GitBox <gi...@apache.org>.
s9514171 commented on pull request #5445:
URL: https://github.com/apache/nifi/pull/5445#issuecomment-1046746780


   @markap14 Thanks for your suggestion. I'll revert the change of EventDrivenSchedulingStrategy
   
   @cemremengu I'm taking on it


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] s9514171 commented on pull request #5445: NIFI-9227 Run Once not working when scheduling strategy is CRON or Ev…

Posted by GitBox <gi...@apache.org>.
s9514171 commented on pull request #5445:
URL: https://github.com/apache/nifi/pull/5445#issuecomment-952583403


   Hi @markap14, sorry to tag you
   Can you help to review this
   Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] markap14 commented on pull request #5445: NIFI-9227 Run Once not working when scheduling strategy is CRON or Ev…

Posted by GitBox <gi...@apache.org>.
markap14 commented on pull request #5445:
URL: https://github.com/apache/nifi/pull/5445#issuecomment-1046039932


   Thanks for adding this @s9514171! I tested it out, and I can verify that CRON driven did in fact remain in a bad state originally and after this PR it does not, so that part works well.
   
   I also tested it with event-driven, though, and it did not work. I created a flow: GenerateFlowFile (CRON driven) -> UpdateAttribute (EventDriven) -> UpdateAttribute.
   Run Once on GenerateFlowFile produced the desired FlowFile. Run Once on the event-driven UpdateAttribute did NOT process the FlowFile. It just left it in the queue. It also left the processor in a state of "RUN_ONCE" which means that I could not start it, edit it, delete it, or run it again.
   
   To be honest, my recommendation would be to revert the changes to the EventDrivenSchedulingStrategy completely and leave it as an unsupported operation. Event Driven was an experiment that we tried, in order to reduce CPU utilization that we had with Timer-Driven processors and provide potentially even better latency. However, once we introduced the "Bored Yield Duration" to timer-driven processors, we no longer had an issue with high CPU utilization, and the expense of event-driven ended up being more expensive than Timer-Driven. We've since found a few issues with Event-Driven scheduling strategy that have not been addressed, simply because we marked the feature as Experimental and we expect to remove it entirely (or otherwise completely rewrite it) in the next major version (2.0). Because of this, nobody should ever use the Event-Driven scheduling strategy, right now, and that's why we didn't implement the Run Once capability there to begin with. But the original behavior, of i
 mmediately failing, is preferable over this behavior of simply not doing anything and leaving the processor in a bad state.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] s9514171 commented on pull request #5445: NIFI-9227 Run Once not working when scheduling strategy is CRON or Ev…

Posted by GitBox <gi...@apache.org>.
s9514171 commented on pull request #5445:
URL: https://github.com/apache/nifi/pull/5445#issuecomment-1046846112


   @markap14 I force-push a version only fix the CRON driven issue
   
   and also create a patch for event-driven, including the issue you mentions upper and integration testing
   [NIFI-9227-fix-event-driven.patch.txt](https://github.com/apache/nifi/files/8109254/NIFI-9227-fix-event-driven.patch.txt)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] cemremengu commented on pull request #5445: NIFI-9227 Run Once not working when scheduling strategy is CRON or Ev…

Posted by GitBox <gi...@apache.org>.
cemremengu commented on pull request #5445:
URL: https://github.com/apache/nifi/pull/5445#issuecomment-1046592961


   @s9514171 if you don't have time to work on this I can make the required changes. Please let me know.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] markap14 merged pull request #5445: NIFI-9227 Run Once not working when scheduling strategy is CRON or Ev…

Posted by GitBox <gi...@apache.org>.
markap14 merged pull request #5445:
URL: https://github.com/apache/nifi/pull/5445


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] cemremengu commented on pull request #5445: NIFI-9227 Run Once not working when scheduling strategy is CRON or Ev…

Posted by GitBox <gi...@apache.org>.
cemremengu commented on pull request #5445:
URL: https://github.com/apache/nifi/pull/5445#issuecomment-1036544436


   I am also seeing this behaviour and it is kind of an annoying bug actually. 
   
   Anything we can do to push this PR through?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nifi] markap14 commented on pull request #5445: NIFI-9227 Run Once not working when scheduling strategy is CRON or Ev…

Posted by GitBox <gi...@apache.org>.
markap14 commented on pull request #5445:
URL: https://github.com/apache/nifi/pull/5445#issuecomment-1050086645


   Thanks @s9514171 the changes look good to me. Will merge to main.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org