NIFI-15906: Fix IllegalStateException during cluster reconnect in StandardConnection#11212
Open
rakesh-rsky wants to merge 1 commit intoapache:mainfrom
Open
NIFI-15906: Fix IllegalStateException during cluster reconnect in StandardConnection#11212rakesh-rsky wants to merge 1 commit intoapache:mainfrom
rakesh-rsky wants to merge 1 commit intoapache:mainfrom
Conversation
… connection destination is a running RemoteGroupPort During cluster reconnect, StandardVersionedComponentSynchronizer calls updateConnectionDestinations() which temporarily re-points connections to a dummy Funnel. When the current destination is a RemoteGroupPort (RPG) that has versionedComponentId=null (common for S2S ports discovered at runtime), the synchronizer cannot match it to the versioned component map and attempts a temp-Funnel detour. StandardConnection.setDestination() previously blocked this with: IllegalStateException: Cannot change destination of Connection because the current destination ([RemoteGroupPort[...]]) is running This left the cluster node permanently disconnected after a reconnect attempt whenever an active RPG ingress port was involved. - Added RemoteGroupPort to the running-destination exemption list alongside Funnel and LocalPort in the setDestination() guard - RemoteGroupPort is safe to re-route: it does not hold per-FlowFile processor execution state, matching the design intent of the existing Funnel and LocalPort exemptions - RemoteGroupPort is already imported in this class (no new imports needed) Co-authored-by: Rakesh Kumar Singh <rsky.rakesh@gmail.com>
868dcc7 to
e257c96
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
During cluster node reconnection, StandardConnection.setDestination() throws an IllegalStateException ("Cannot change destination while destination is running") when the destination is a RemoteGroupPort. Remote ports are managed by the cluster coordinator and can legally be running during reconnect — they should be exempt from this guard, just like Funnel and NiFiPort.
Changes
Testing
Fixes: https://issues.apache.org/jira/browse/NIFI-15906