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

   Concurrent Connector start requests can both observe an eligible state and 
schedule startup, producing a `STARTING -> STARTING` transition and invoking 
`Connector.start()` twice. This change atomically claims the transition to 
`STARTING`; a caller that loses the race re-reads the state and joins the 
pending start operation. Pending-future bookkeeping is coordinated with state 
transitions so a late waiter cannot miss `RUNNING`, and futures are completed 
outside the bookkeeping lock.
   
   The regression test releases two concurrent requests after both have 
captured `STOPPED`. It failed before the fix because `Connector.start()` was 
invoked twice, and passes with a single invocation after the fix. A focused 
state-transition test covers registration after `RUNNING`.
   
   Jira: https://issues.apache.org/jira/browse/NIFI-16308
   
   Validation:
   
   - `mvn -o -pl 
nifi-framework-bundle/nifi-framework/nifi-framework-core-api,nifi-framework-bundle/nifi-framework/nifi-framework-core
 -Pcontrib-check clean verify -Dstyle.color=never`
   - API: 29 tests passed
   - Core: 722 tests passed, 3 skipped
   - Checkstyle, RAT, and PMD 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