bobpaulin commented on code in PR #11872:
URL: https://github.com/apache/nifi/pull/11872#discussion_r4557018920
##########
nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/components/connector/StandardConnectorNode.java:
##########
@@ -112,14 +119,28 @@ public class StandardConnectorNode implements
ConnectorNode, GroupedComponent {
private final ConnectorStateTransition stateTransition;
private final AtomicReference<String> versionedComponentId = new
AtomicReference<>();
private final FlowContextFactory flowContextFactory;
- private final FrameworkFlowContext activeFlowContext;
+ private final ConnectorFlowSnapshotMapper snapshotMapper;
+ private volatile FrameworkFlowContext activeFlowContext;
+ private final AtomicReference<FlowEvolutionStatus> flowEvolutionStatus =
new AtomicReference<>(FlowEvolutionStatus.INACTIVE);
+ private volatile ConnectorFlowSnapshot authoritativeFlowSnapshot;
+ private final Object flowEvolutionLock = new Object();
+ private volatile StandardFlowEvolutionContext flowEvolutionContext;
+ private CompletableFuture<Void> prepareForFlowEvolutionFuture;
+ private Future<Void> evolveFlowFuture;
Review Comment:
[Claude Opus 5.5] Agreed. The four per-attempt fields (context,
earlier-drain flag, hook future, evolve-drain task) are now one
FlowEvolutionAttempt. Every snapshot write goes through
installAuthoritativeSnapshot, which updates the snapshot and the drain status
together under flowEvolutionLock, and capturing the snapshot now re-checks
under the lock before installing. Writers keep the lock because some
transitions must happen atomically with Connector state changes.
managedFlowMissingAtStartup and unresolvedParameterSecretReferences stay
separate, since they record what restore found rather than the progress of an
attempt.
--
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]