advancedxy commented on code in PR #470:
URL: https://github.com/apache/incubator-uniffle/pull/470#discussion_r1089889920


##########
client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java:
##########
@@ -216,6 +245,12 @@ private void genServerToBlocks(ShuffleBlockInfo sbi, 
List<ShuffleServerInfo> ser
         partitionToBlocks.put(partitionId, Lists.newArrayList());
       }
       partitionToBlocks.get(partitionId).add(sbi);
+      if (excludeServers != null) {
+        excludeServers.add(ssi);
+      }
+      if (++assignedNum >= replicaNum) {

Review Comment:
   Nit: break this line into two lines for better readability? 
   ```
   assignedNum += 1;
   if (assignedNum >= replicaNum) {
   ...
   ```



##########
client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java:
##########
@@ -216,6 +245,12 @@ private void genServerToBlocks(ShuffleBlockInfo sbi, 
List<ShuffleServerInfo> ser
         partitionToBlocks.put(partitionId, Lists.newArrayList());
       }
       partitionToBlocks.get(partitionId).add(sbi);
+      if (excludeServers != null) {

Review Comment:
   Did some related code search. It would be possible that some servers in the 
serverList are duplicated.
   For current logic, the duplicated server would be selected once, is that 
expected.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to