Hexiaoqiao commented on code in PR #6530:
URL: https://github.com/apache/hadoop/pull/6530#discussion_r2802919926
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java:
##########
@@ -741,7 +741,18 @@ private void offerService() throws Exception {
if (state == HAServiceState.ACTIVE) {
handleRollingUpgradeStatus(resp);
}
- commandProcessingThread.enqueue(resp.getCommands());
+ DatanodeCommand[] cmds = resp.getCommands();
+ if (cmds != null && cmds.length != 0) {
+ int length = cmds.length;
+ for (int i = length - 1; i >= 0; i--) {
Review Comment:
Will this loop will impact the performance of DataNode when there are huge
number commands from NameNode? I prefer to let NameNode send back only Access
key without other commands when necessary. Would you like to improve it at
NameNode side too? BTW, It does not block this PR progress.
--
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]