From b41c0754d8692b1df8cdbfaf22297d33751f8569 Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Wed, 3 Apr 2024 16:35:35 -0400 Subject: [PATCH] NIFI-12969: Fixed a typo in the #isTempDestinationNecessary method, where we were comparing existingConnection.getProcessGroup() to newDestination.getProcessGroup(), instead of comparing existingConnection.getDestination().getProcessGroup() to newDestination.getProcessGroup(). I.e., we were comparing the Destination's PG to the Connection's PG instead of comparing Destination's PG to Destination's PG. This resulted in using a temporary funnel when we shouldn't. And as a result it attempted to change a Connection's Destination while the destination was running. --- .../synchronization/StandardVersionedComponentSynchronizer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java index 74ffd715b3da..7b128fc6bd46 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/flow/synchronization/StandardVersionedComponentSynchronizer.java @@ -741,7 +741,7 @@ private boolean isTempDestinationNecessary(final Connection existingConnection, // If the destination is an Input Port or an Output Port and the group changed, use a temp destination final ConnectableType connectableType = newDestination.getConnectableType(); final boolean port = connectableType == ConnectableType.OUTPUT_PORT || connectableType == ConnectableType.INPUT_PORT; - final boolean groupChanged = !newDestination.getProcessGroup().equals(existingConnection.getProcessGroup()); + final boolean groupChanged = !newDestination.getProcessGroup().equals(existingConnection.getDestination().getProcessGroup()); if (port && groupChanged) { LOG.debug("Will use a temporary destination for {} because its destination is a port whose group has changed", existingConnection); return true;