You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/02/10 07:59:00 UTC

[jira] [Commented] (HDFS-16914) Add some logs for updateBlockForPipeline RPC.

    [ https://issues.apache.org/jira/browse/HDFS-16914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17686924#comment-17686924 ] 

ASF GitHub Bot commented on HDFS-16914:
---------------------------------------

slfan1989 commented on code in PR #5381:
URL: https://github.com/apache/hadoop/pull/5381#discussion_r1102400991


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:
##########
@@ -5943,6 +5943,9 @@ LocatedBlock bumpBlockGenerationStamp(ExtendedBlock block,
     }
     // Ensure we record the new generation stamp
     getEditLog().logSync();
+    LOG.info("bumpBlockGenerationStamp(" + locatedBlock.getBlock()
+        + ", client=" + clientName

Review Comment:
   Thanks for your contribution, but we need to use {} instead of +.
   
   like this
   ```
    LOG.info("bumpBlockGenerationStamp({}), client={}", locatedBlock.getBlock(), clientName)
   ```





> Add some logs for updateBlockForPipeline RPC.
> ---------------------------------------------
>
>                 Key: HDFS-16914
>                 URL: https://issues.apache.org/jira/browse/HDFS-16914
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namanode
>    Affects Versions: 3.3.4
>            Reporter: ZhangHB
>            Assignee: ZhangHB
>            Priority: Minor
>
> Recently,we received an phone alarm about missing blocks.  We found logs in one datanode where the block was placed on  like below:
>  
> {code:java}
> 2023-02-09 15:05:10,376 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Received BP-578784987-x.x.x.x-1667291826362:blk_1305044966_231832415 src: /clientAddress:44638 dest: /localAddress:50010 of size 45733720
> 2023-02-09 15:05:10,376 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Received BP-578784987-x.x.x.x-1667291826362:blk_1305044966_231826462 src: /upStreamDatanode:60316 dest: /localAddress:50010 of size 45733720 {code}
> the datanode received the same block with different generation stamp because of socket timeout exception.  blk_1305044966_231826462 is received from upstream datanode in pipeline which has two datanodes.  blk_1305044966_231832415 is received from client directly.   
>  
> we have search all log info about blk_1305044966 in namenode and three datanodes in original pipeline. but we could not obtain any helpful message about the generation stamp 231826462.  After diving into the source code,  it was assigned in NameNodeRpcServer#updateBlockForPipeline which was invoked in DataStreamer#setupPipelineInternal.   The updateBlockForPipeline RPC does not have any log info. So I think we should add some logs in this RPC.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org