[
https://issues.apache.org/jira/browse/NIFI-16594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18149967#comment-18149967
]
ASF subversion and git services commented on NIFI-16594:
--------------------------------------------------------
Commit f10a689ddd4f6d891c17150a4f731d73f04be951 in nifi's branch
refs/heads/main from Pierre Villard
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=f10a689ddd4 ]
NIFI-16594 Preserve node statuses received during flow synchronization on
reconnection (#11932)
Signed-off-by: Pierre Villard <[email protected]>
Signed-off-by: David Handermann <[email protected]>
> Reconnecting node can revert newer cluster node statuses received during flow
> synchronization
> ---------------------------------------------------------------------------------------------
>
> Key: NIFI-16594
> URL: https://issues.apache.org/jira/browse/NIFI-16594
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Pierre Villard
> Assignee: Pierre Villard
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> When a node handles a reconnection request,
> *StandardFlowService.handleReconnectionRequest* applies the node connection
> statuses from the request twice. The first time is before the flow is loaded,
> via loadFromConnectionResponse → initializeNodeConnectionState. The second
> time is through ClusterCoordinator.resetNodeStatuses after the flow has been
> loaded. Because resetNodeStatuses replaces statuses unconditionally, any
> status update the node received while synchronizing the flow is reverted to
> the older value from the request.
> If a peer became CONNECTED during that window, the reconnecting node keeps
> seeing it as CONNECTING. If the node is then offloaded, for example
> decommissioned shortly after a rolling restart, its load-balanced queues
> never transfer FlowFiles to that peer. The load-balance client only sends to
> CONNECTED peers, and heartbeats stop at disconnect, so the view is never
> corrected. The offload stays in OFFLOADING indefinitely, with FlowFiles left
> on the node, until the node is restarted.
> The second application should be replaced by a notification of the current
> statuses to cluster topology listeners. Queues created while loading the flow
> still align with the current topology, without reverting newer statuses. The
> comment on resetNodeStatuses, which describes an update-id comparison it
> doesn’t perform, should also be corrected.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)