NIFI-16174 - Treat a stateless process group as a single lifecycle unit when starting/stopping a controller service's referencing components - #11515
Open
ncover21 wants to merge 3 commits into
Open
Conversation
…it when starting/stopping a controller service's referencing components StandardControllerServiceProvider scheduled processors that reference a controller service individually, even when they belong to a stateless process group. Because a stateless group is a single scheduling unit, this left the group with a mixed running/stopped processor state and a group node stuck RUNNING, from which it could not recover. Resolve each referenced processor's owning stateless group (STATELESS -> self, INHERITED -> nearest explicit ancestor) and, for stateless members, stop the group once via ProcessGroup.stopProcessing() / start it once via ComponentScheduler.startStatelessGroup(), mapping the group's single future to every affected member. Standard processors are unchanged. Public ControllerServiceProvider signatures are unchanged. Adds unit coverage in StandardControllerServiceProviderTest and an end-to-end regression (ConnectorTroubleshootingIT) backed by a stateless controller-service reference in the ComponentLifecycleConnector test fixture.
ncover21
marked this pull request as ready for review
August 7, 2026 00:52
ncover21
marked this pull request as draft
August 7, 2026 16:24
…wning stateless group A referenced processor's process group can report a null execution engine (e.g. in unit-test fixtures backed by mock process groups). Treat a null engine as non-stateless so getStatelessGroup returns null and the processor is handled on the standard per-component path, rather than throwing an NPE in the switch.
ncover21
marked this pull request as ready for review
August 7, 2026 17:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NIFI-16174
StandardControllerServiceProviderscheduled 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 stuckRUNNINGand 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.startNowreturns early whenresolveExecutionEngine() == 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 reportsgetPhysicalScheduledState() == RUNNING, so it counts as an active reference inverifyCanDisable, which would then block the controller service from being disabled.This change treats the owning stateless group as a single unit on both paths:
STATELESS-> self,INHERITED-> nearest explicit ancestor).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.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
ControllerServiceProvidermethod signatures are unchanged.Tracking
NIFI-16174mainbuilds on the changed modules (checkstyle + PMD pass)