bobpaulin commented on code in PR #11872:
URL: https://github.com/apache/nifi/pull/11872#discussion_r4606517497


##########
nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/components/connector/StandardConnectorNode.java:
##########
@@ -766,6 +815,11 @@ private void releaseWorkingFlowContext(final 
WorkingFlowContextState workingCont
 
     @Override
     public void abortUpdate(final Throwable cause) {
+        if (isFlowEvolutionInProgress() || hasFlowEvolutionFailed()) {
+            failFlowEvolution(cause == null ? null : cause.getMessage(), 
cause);
+            return;
+        }
+
         stateTransition.setCurrentState(ConnectorState.UPDATE_FAILED);

Review Comment:
   [Claude Opus 5.5] Fixed as you suggested:
   
   StandardConnectorStateTransition now completes pending stop futures 
exceptionally on any transition other than STOPPING or STOPPED. The message 
names the new state.
   stopComponent completes its own future before it returns early: normally if 
the Connector is already STOPPED, exceptionally otherwise.
   This covers the normal configuration-update path as well. Tests are in 
TestStandardConnectorStateTransition and 
testStopDuringUpdateFailsWhenUpdateAbortsFirst.
   
   I left the separate overlap between Connector.stop and Connector.applyUpdate 
out of this PR. The same overlap exists on main for configuration updates, so a 
follow-up JIRA could address it for both paths.



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