szetszwo commented on a change in pull request #2452:
URL: https://github.com/apache/ozone/pull/2452#discussion_r677474151



##########
File path: 
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/ratis/RatisHelper.java
##########
@@ -170,8 +173,12 @@ public static RaftGroup newRaftGroup(Pipeline pipeline) {
   public static RaftClient newRaftClient(RpcType rpcType, Pipeline pipeline,
       RetryPolicy retryPolicy, GrpcTlsConfig tlsConfig,
       ConfigurationSource ozoneConfiguration) throws IOException {
+    // TODO: For now, always set first node as primary. In the future we should
+    //  use the local or closest node in the pipline.
+    final DatanodeDetails leader = pipeline.getLeaderNode();

Review comment:
       The TODO can be removed since the first datanode is supposed to be the 
closest datanode.  SCM is supposed to sort the datanode in the pipeline 
according the distance to the client.  Not sure if SCM is currently sorting the 
datanodes.  We should check the code.
   
   BTW, the leader local variable is no longer needed.  We should revert the 
change.




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