[
https://issues.apache.org/jira/browse/HDFS-17372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18058330#comment-18058330
]
ASF GitHub Bot commented on HDFS-17372:
---------------------------------------
Hexiaoqiao commented on code in PR #6530:
URL: https://github.com/apache/hadoop/pull/6530#discussion_r2802941951
##########
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:
Addendum: If namenode only seed back Access key, we could process
`KeyUpdateCommand` directly, rather than enter the queue then process it but it
could be blocked by other commands.
> 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]