[ 
https://issues.apache.org/jira/browse/HDFS-15953?focusedWorklogId=577597&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-577597
 ]

ASF GitHub Bot logged work on HDFS-15953:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Apr/21 13:45
            Start Date: 06/Apr/21 13:45
    Worklog Time Spent: 10m 
      Work Description: Hexiaoqiao commented on a change in pull request #2872:
URL: https://github.com/apache/hadoop/pull/2872#discussion_r607862424



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java
##########
@@ -252,7 +252,7 @@ public void setTransactionId(long txid) {
   }
   
   public boolean hasRpcIds() {
-    return rpcClientId != RpcConstants.DUMMY_CLIENT_ID
+    return !Arrays.equals(rpcClientId, RpcConstants.DUMMY_CLIENT_ID)

Review comment:
       Thanks @WeisonWei , It is interesting catches. There will be some other 
place has the same un-corrected compares, Would you like to correct it at the 
same time?




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

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 577597)
    Time Spent: 20m  (was: 10m)

> DUMMY_CLIENT_ID's verification may be invalid
> ---------------------------------------------
>
>                 Key: HDFS-15953
>                 URL: https://issues.apache.org/jira/browse/HDFS-15953
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Xiaoxing Wei
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> *_rpcClientId != RpcConstants.DUMMY_CLIENT_ID_* in *_FSEditLogOp#hasRpcIds()_*
> {code:java}
> // code placeholder
> public boolean hasRpcIds() {
>   return rpcClientId != RpcConstants.DUMMY_CLIENT_ID
>       && rpcCallId != RpcConstants.INVALID_CALL_ID;
> }
> {code}
>  
> determine that two arrays are equal should use "Arrays.equals"
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to