ncover21 opened a new pull request, #11515: URL: https://github.com/apache/nifi/pull/11515
# Summary [NIFI-16174](https://issues.apache.org/jira/browse/NIFI-16174) `StandardControllerServiceProvider` scheduled controller-service referencing processors individually even when they belong to a stateless process group. Because a stateless group is a single scheduling unit, this left the group in a mixed running/stopped state with the group node stuck `RUNNING` and unable to recover. It surfaces during break-glass/troubleshooting on connectors whose stateless subgroup references a root-scoped controller service. The start path already skips stateless members (`DefaultComponentScheduler.startNow` returns early when `resolveExecutionEngine() == STATELESS`); the stop path (`unscheduleReferencingComponents`) did not, so it stopped members individually. Simply ignoring stateless members on stop is not sufficient either: a running stateless member reports `getPhysicalScheduledState() == RUNNING`, so it counts as an active reference in `verifyCanDisable`, which would then block the controller service from being disabled. This change treats the owning stateless group as a single unit on both paths: - Resolve each referenced processor's owning stateless group (`STATELESS` -> self, `INHERITED` -> nearest explicit ancestor). - On stop, call `ProcessGroup.stopProcessing()` once per distinct owning stateless group (its members transition to STOPPED together, so the service can then be disabled), mapping the group's single future to every affected member. - On start, call `ComponentScheduler.startStatelessGroup()` once per distinct owning stateless group, so "enable service and start referencing components" restarts the group. Standard (non-stateless) referencing components are unchanged, and the public `ControllerServiceProvider` method signatures are unchanged. # Tracking - [x] JIRA issue created: NIFI-16174 - [x] Commit message prefixed with `NIFI-16174` - [x] `main` builds cleanly on the changed modules (checkstyle + PMD pass) - [x] New unit tests added (`StandardControllerServiceProviderTest`) and passing - [x] New end-to-end regression added (`ConnectorTroubleshootingIT`) backed by a stateless controller-service reference in the `ComponentLifecycleConnector` fixture -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
