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 <[email protected]>
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 [email protected] or file a JIRA ticket
with INFRA.
---