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

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

balodesecurity opened a new pull request, #8271:
URL: https://github.com/apache/hadoop/pull/8271

   ## Summary
   
   - When a `SocketTimeoutException` (or other error) occurs in the DataXceiver 
service, the log messages did not include the DFSClient ID, making it 
impossible to trace which client caused the error.
   - Added `previousOpClientName` (the DFSClient ID) to the shared error string 
in `run()`'s catch block, which covers all error paths including 
`SocketTimeoutException` during `READ_BLOCK`.
   - Also added `clientName` to exception log messages directly in 
`readBlock()`, `writeBlock()`, and `transferBlock()` for completeness.
   
   ## Changes
   
   - `DataXceiver.run()`: include `previousOpClientName` in the error string 
used across all exception branches
   - `DataXceiver.readBlock()`: add `clientName` to `SocketException` (TRACE) 
and `IOException` (WARN) log messages
   - `DataXceiver.writeBlock()`: add `clientname` to the `IOException` log 
message
   - `DataXceiver.transferBlock()`: add `clientName` to the `IOException` log 
message
   
   ## Test plan
   
   - [ ] Existing `TestDataXceiverBackwardsCompat` passes
   - [ ] Existing `TestDataXceiverLazyPersistHint` passes
   - [ ] CI (Yetus) build passes on trunk
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)




> SocketTimeoutExceptions over the DataXciever service of a DN should print the 
> DFSClient ID
> ------------------------------------------------------------------------------------------
>
>                 Key: HDFS-4277
>                 URL: https://issues.apache.org/jira/browse/HDFS-4277
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode
>    Affects Versions: 2.0.0-alpha
>            Reporter: Harsh J
>            Priority: Minor
>              Labels: newbie
>
> Currently, when one faces a SocketTimeoutExceptions (or any exception rather, 
> in a DN log, for a client <-> DN interaction), we fail to print the DFSClient 
> ID. This makes it untraceable (like is it a speculative MR caused timeout, or 
> a RS crash, etc.).



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

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

Reply via email to