mirror of https://github.com/apache/nifi.git
NIFI-12992 Reset Validation State when Updating Process Group Execution Engine (#9187)
- Do not reset validation status for a component if it is not in a state where validation will be performed Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
parent
2e7a39d200
commit
e9ce40d209
|
@ -4348,6 +4348,8 @@ public final class StandardProcessGroup implements ProcessGroup {
|
|||
try {
|
||||
verifyCanSetExecutionEngine(executionEngine);
|
||||
this.executionEngine = executionEngine;
|
||||
findAllProcessors().forEach(ProcessorNode::resetValidationState);
|
||||
findAllControllerServices().forEach(ControllerServiceNode::resetValidationState);
|
||||
} finally {
|
||||
writeLock.unlock();
|
||||
}
|
||||
|
|
|
@ -1387,6 +1387,11 @@ public abstract class AbstractComponentNode implements ComponentNode {
|
|||
public void resetValidationState() {
|
||||
lock.lock();
|
||||
try {
|
||||
if (!isValidationNecessary()) {
|
||||
logger.debug("Triggered to reset validation state of {} but will leave validation state as {} because validation is not necessary in its current state", this, validationState.get());
|
||||
return;
|
||||
}
|
||||
|
||||
validationContext = null;
|
||||
validationState.set(new ValidationState(ValidationStatus.VALIDATING, Collections.emptyList()));
|
||||
|
||||
|
|
Loading…
Reference in New Issue