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 2019/10/03 16:58:53 UTC
[GitHub] [nifi] markap14 commented on a change in pull request #3782: [NIFI-6735] - validate components before restarting processors follow…
markap14 commented on a change in pull request #3782: [NIFI-6735] - validate components before restarting processors follow…
URL: https://github.com/apache/nifi/pull/3782#discussion_r331147181
##########
File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ParameterContextResource.java
##########
@@ -867,6 +867,12 @@ private ParameterContextEntity updateParameterContext(final AsynchronousWebReque
updatedEntity = performParameterContextUpdate(asyncRequest, uri, replicateRequest, revision, updatedContextEntity);
logger.info("Successfully updated Parameter Context with ID {}", updatedContextEntity.getId());
} finally {
+ if (!asyncRequest.isCancelled()) {
Review comment:
@joewitt We do certainly want to avoid making synchronous requests from a web thread because we don't want to block the response from going back to the user. In this particular case, this code is executed from a separate background thread, so blocking here should be okay.
That being said, @rfellows this will perform validation only on the cluster coordinator, where this will occur. We need to ensure that in a cluster environment that we wait for validation to complete across all nodes in the cluster. So we need to implement this from within the two implementations of the `ComponentLifecycle` interfaces. `LocalComponentLifecycle` can implement essentially the same way, calling `serviceFacade#validateComponents` but `ClusterReplicationComponentLifecycle` will need to basically just poll, waiting for the validation to complete, similar to how it has the `waitForProcessorStatus` method waits for the processors to be started or stopped.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services