[
https://issues.apache.org/jira/browse/HDFS-17372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18058329#comment-18058329
]
ASF GitHub Bot commented on HDFS-17372:
---------------------------------------
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.
> CommandProcessingThread#queue should use LinkedBlockingDeque to prevent high
> priority command blocked by low priority command
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: HDFS-17372
> URL: https://issues.apache.org/jira/browse/HDFS-17372
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: Haobo Zhang
> Assignee: Haobo Zhang
> Priority: Major
> Labels: pull-request-available
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]