Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,18 @@ public void setDestination(final Connectable newDestination) {
return;
}

if (previousDestination.isRunning() && !(previousDestination instanceof Funnel || previousDestination instanceof LocalPort)) {
// Allow destination changes when the current destination is a Funnel, a LocalPort, or a
// RemoteGroupPort. Funnels and LocalPorts cannot be stopped/started so they are exempt.
// RemoteGroupPort represents an S2S ingress point: re-routing its incoming connections
// during cluster reconnect synchronization (e.g., temporarily pointing to a dummy Funnel)
// is safe because the RPG does not hold per-FlowFile processing state the way a Processor
// does. Without this exemption, StandardVersionedComponentSynchronizer throws
// IllegalStateException when a running RPG with versionedComponentId=null is encountered
// during updateConnectionDestinations(), leaving the node permanently disconnected.
// (NIFI-15906)
if (previousDestination.isRunning() && !(previousDestination instanceof Funnel
|| previousDestination instanceof LocalPort
|| previousDestination instanceof RemoteGroupPort)) {
throw new IllegalStateException("Cannot change destination of Connection because the current destination ([%s]) is running".formatted(previousDestination));
}

Expand Down
Loading