NIFI-11330: Restarting service referenced by parameter only when service is active (#7078)

This commit is contained in:
Joe Gresock 2023-03-23 13:13:22 -04:00 committed by GitHub
parent 24bbe51b54
commit 9de93f19a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1555,9 +1555,12 @@ public class StandardVersionedComponentSynchronizer implements VersionedComponen
final Set<ControllerServiceNode> referencingServices = referenceManager.getControllerServicesReferencing(parameterContext, paramName);
for (final ControllerServiceNode referencingService : referencingServices) {
final boolean isServiceActive = referencingService.isActive();
stopControllerService(referencingService, null, timeout, synchronizationOptions.getComponentStopTimeoutAction(), componentsToRestart, servicesToRestart,
synchronizationOptions);
servicesToRestart.add(referencingService);
if (isServiceActive) {
servicesToRestart.add(referencingService);
}
}
}