Skip to content

Commit

Permalink
NIFI-12969: Fixed a typo in the #isTempDestinationNecessary method, w…
Browse files Browse the repository at this point in the history
…here 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.
  • Loading branch information
markap14 committed Apr 3, 2024
1 parent 88d434f commit b41c075
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b41c075

Please sign in to comment.