nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi] ivan1221 commented on a change in pull request #4045: NIFI-7117: When SocketLoadBalancedFlowFileQueue creates its array of …
Date Tue, 11 Feb 2020 18:20:19 GMT
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_r377812741
 
 

 ##########
 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.
+            if (!partitionList.contains(localPartition)) {
 
 Review comment:
   Perfect, I understand. Thank you very much for your explanation. I am very interested in
this commit to be able to take the version to production.**+1**

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message