nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From olegz <...@git.apache.org>
Subject [GitHub] nifi pull request: NIFI-1164 decreased the chances of race conditi...
Date Mon, 16 Nov 2015 18:19:36 GMT
GitHub user olegz opened a pull request:

    https://github.com/apache/nifi/pull/126

    NIFI-1164 decreased the chances of race condition

    Removed checks for 'if (getState() != ControllerServiceState.DISABLED)’ from StandardControllerServiceNode.verifyCanEnable(..)
operations based on the discussion that we had in NIFI-1143 where ‘enablable’ service
is the one that is not ENABLED or ENABLING.
    On top of that the actual state check is redundant since it is going  to be checked again
when isValid() is invoked.
    Cleaned up the code in StandardControllerServiceProvider.enableReferencingServices(..)
since:
    1. It had the same check ordering issue on service state between ENABLING and ENABLED
as was described in NIFI-1143.
    2. Removed redundant recursiveReferences computation
    3. There was two loops iterating over the same collection, so merged that into one
    4. Removed redundant state check in the loop since it would be checked again as part of
'verifyCanEnable'

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/olegz/nifi NIFI-1164

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/126.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #126
    
----
commit 54c5c0397c6d45d34c7c75e5fe44984dcb765ea4
Author: Oleg Zhurakousky <oleg@suitcase.io>
Date:   2015-11-16T18:18:43Z

    NIFI-1164 decreased the chances of race condition
    Removed checks for 'if (getState() != ControllerServiceState.DISABLED)’ from StandardControllerServiceNode.verifyCanEnable(..)
operations based on the discussion that we had in NIFI-1143 where ‘enablable’ service
is the one that is not ENABLED or ENABLING.
    On top of that the actual state check is redundant since it is going  to be checked again
when isValid() is invoked.
    Cleaned up the code in StandardControllerServiceProvider.enableReferencingServices(..)
since:
    1. It had the same check ordering issue on service state between ENABLING and ENABLED
as was described in NIFI-1143.
    2. Removed redundant recursiveReferences computation
    3. There was two loops iterating over the same collection, so merged that into one
    4. Removed redundant state check in the loop since it would be checked again as part of
'verifyCanEnable'

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message