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

bc Wong commented on HDFS-1001:
-------------------------------

Yes, Todd. The client sends CHECKSUM_OK when it reads to the end of the data. 
The DN expects CHECKSUM_OK only when it sends the entire block.

It's my goal that either side can independently decide whether a CHECKSUM_OK is 
supposed to be present. (A good protocol should do that.) So I propose:
1. The client keeps its current behaviour, sending CHECKSUM_OK when it reads to 
the end of the data.
2. The DN, after sending all the data, always expects a CHECKSUM_OK. If it's 
not there, it will close the client connection.
3. Point #2 does not matter currently, since the DN always closes the client 
connection. But HDFS-941 may change that.

I can't think of a good way to write a test for this. Any suggestions please?

> DataXceiver and BlockReader disagree on when to send/recv CHECKSUM_OK
> ---------------------------------------------------------------------
>
>                 Key: HDFS-1001
>                 URL: https://issues.apache.org/jira/browse/HDFS-1001
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 0.22.0
>            Reporter: bc Wong
>
> Running the TestPread with additional debug statements reveals that the 
> BlockReader sends CHECKSUM_OK when the DataXceiver doesn't expect it. 
> Currently it doesn't matter since DataXceiver closes the connection after 
> each op, and CHECKSUM_OK is the last thing on the wire. But if we want to 
> cache connections, they need to agree on the exchange of CHECKSUM_OK.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to