[
https://issues.apache.org/jira/browse/NIFI-8731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17369585#comment-17369585
]
ASF subversion and git services commented on NIFI-8731:
-------------------------------------------------------
Commit 88cc232f15d01ee1c902854054ab994e3f9a5a6e in nifi's branch
refs/heads/main from markap14
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=88cc232 ]
NIFI-8731: If a processor is running but made invalid due to a parameter
update, it ends up in a state of STARTING. If the parameter is then updated
again, it transitions the state to STOPPING but the processor is not fully
stopped yet. At that point, the parameter is updated and the processor is
attempted to be started again. Fixed this by keeping the number of active
threads to >= 1 if processor is STOPPING in order to convey that it is not
fully stopped. Also addressed a few minor bugs discovered in the process: when
stopping a processor, if status == invalid, it should be skipped instead of
waiting for the status to become stopped since it never will be. In the DTO's
run status use Stopped instead of Invalid if there is at least 1 active thread
/ if stopping but not stopped. When considering if a processor has transitioned
to the desired state for parameter updates, do not consider validation status
if still transitioning to stopped or if the desired state has already been
reached. Added new system tests to verify behavior. (#5180)
This closes #5180
> When updating Parameter Context, sometimes see failure: processor cannot be
> started because it is not stopped. Current state is STOPPING
> ----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: NIFI-8731
> URL: https://issues.apache.org/jira/browse/NIFI-8731
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Critical
> Fix For: 1.14.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> To replicate:
> * Create a Process Group with a Parameter Context bound
> * Create a Processor that references a Parameter
> * Start the Processor
> * Change Parameter to a value that will make the processor invalid
> * Attempt to change the Parameter again
> This will result in a stack trace similar to:
> {code:java}
> org.apache.nifi.web.util.LifecycleManagementException: Failed to transition
> components to a state of RUNNING due to Node localhost:8481 is unable to
> fulfill this request due to: 3528126f-017a-1000-0000-0000003d5574 cannot be
> started because it is not stopped. Current state is STOPPING
> at
> org.apache.nifi.web.util.ClusterReplicationComponentLifecycle.scheduleComponents(ClusterReplicationComponentLifecycle.java:128)
> at
> org.apache.nifi.web.api.ParameterContextResource.restartProcessors(ParameterContextResource.java:987)
> at
> org.apache.nifi.web.api.ParameterContextResource.updateParameterContext(ParameterContextResource.java:885)
> at
> org.apache.nifi.web.api.ParameterContextResource.lambda$submitUpdateRequest$17(ParameterContextResource.java:812)
> at
> org.apache.nifi.web.api.concurrent.AsyncRequestManager$2.run(AsyncRequestManager.java:117)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748) {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)