markap14 opened a new pull request, #11664:
URL: https://github.com/apache/nifi/pull/11664

   # Summary
   
   [NIFI-16288](https://issues.apache.org/jira/browse/NIFI-16288)
   
   A Connector could remain in `STOPPING` when a managed Controller Service 
never finished `@OnEnabled` or a managed Processor never finished 
`@OnScheduled`. This covered lifecycle methods that block and lifecycle methods 
that keep throwing while NiFi retries them.
   
   # Changes
   
   - Disabling an `ENABLING` Controller Service now moves it to `DISABLING`, 
cancels its enable future and pending retry, and interrupts the active 
`@OnEnabled` invocation. The service remains `DISABLING` until `@OnEnabled` 
returns and `@OnDisabled` finishes.
   - Stopping a `STARTING` Processor now cancels its start future and pending 
retries and interrupts the active `@OnScheduled` invocation. If it ignores 
interruption, the existing Processor termination path remains available.
   - Stopping a Connector during startup recursively stops managed Processors 
before disabling managed Controller Services.
   - Connector start and stop calls are coordinated so an earlier lifecycle 
invocation cannot affect a later start cycle.
   
   # Tests
   
   - Connector tests cover blocked and repeatedly failing Controller Service 
enablement, lifecycle ordering, stop followed by restart, blocked and 
repeatedly failing Processor startup, and Processor termination.
   - Scheduler tests verify start-future cancellation, interruption, unschedule 
completion ordering, and replacement safety after Processor termination.
   - The regression tests failed against the original production code and pass 
with this change.
   
   # Verification
   
   - `mvn clean install -T 4 -DskipTests`
   - `nifi-framework-components`: 375 tests passed
   - `TestStandardProcessScheduler` and `StandardConnectorNodeIT`: 36 tests 
passed
   - Checkstyle and PMD passed for affected modules
   - Framework NAR and system-test assembly rebuilt with `clean install`
   - `ConnectorLifecycleIT` and `ConnectorProcessorValidationIT`: 2 system 
tests passed


-- 
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]

Reply via email to