ivan1221 commented on a change in pull request #4045: NIFI-7117: When SocketLoadBalancedFlowFileQueue creates its array of … URL: https://github.com/apache/nifi/pull/4045#discussion_r377383687
########## File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/clustered/SocketLoadBalancedFlowFileQueue.java ########## @@ -151,15 +151,19 @@ public SocketLoadBalancedFlowFileQueue(final String identifier, final Connection // that is not the local node identifier. If the Local Node Identifier is not yet known, that's okay. When it becomes known, // the queuePartitions array will be recreated with the appropriate partitions. final List<QueuePartition> partitionList = new ArrayList<>(); - partitionList.add(localPartition); final NodeIdentifier localNodeId = clusterCoordinator.getLocalNodeIdentifier(); for (final NodeIdentifier nodeId : sortedNodeIdentifiers) { if (nodeId.equals(localNodeId)) { - continue; + partitionList.add(localPartition); + } else { + partitionList.add(createRemotePartition(nodeId)); } + } - partitionList.add(createRemotePartition(nodeId)); + // Ensure that our list of queue partitions always contains the local partition. Review comment: ¿Is there a case in which this conditional is not met? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services