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.

This closes #8600.

Signed-off-by: Joseph Witt <joewitt@apache.org>
This commit is contained in:
Mark Payne 2024-04-03 16:35:35 -04:00 committed by Joseph Witt
parent 644d086ff2
commit 3a03caa149
No known key found for this signature in database
GPG Key ID: 9093BF854F811A1A
1 changed files with 1 additions and 1 deletions

View File

@ -741,7 +741,7 @@ public class StandardVersionedComponentSynchronizer implements VersionedComponen
// If the destination is an Input Port or an Output Port and the group changed, use a temp destination // 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 ConnectableType connectableType = newDestination.getConnectableType();
final boolean port = connectableType == ConnectableType.OUTPUT_PORT || connectableType == ConnectableType.INPUT_PORT; 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) { if (port && groupChanged) {
LOG.debug("Will use a temporary destination for {} because its destination is a port whose group has changed", existingConnection); LOG.debug("Will use a temporary destination for {} because its destination is a port whose group has changed", existingConnection);
return true; return true;