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

Todd Lipcon commented on HDFS-3721:
-----------------------------------

The issue here is the following code:
{code}
  /** Header size for a packet */
  private static final int PROTO_SIZE = 
    PacketHeaderProto.newBuilder()
      .setOffsetInBlock(0)
      .setSeqno(0)
      .setLastPacketInBlock(false)
      .setDataLen(0)
      .setSyncBlock(false)
      .build().getSerializedSize();
  public static final int PKT_HEADER_LEN =
    6 + PROTO_SIZE;
{code}

Since the new {{syncBlock}} flag is optional, this caused the packet header to 
become variable-length depending on whether the client is post-hsync or not. 
This screws up the datanode, resulting in an exception:
{code}
12/07/24 13:55:45 INFO datanode.DataNode: Exception in receiveBlock for 
BP-2093170007-127.0.0.1-1342943513882:blk_3332306339985613438_1008
java.io.IOException: Data remaining in packet does not matchsum of checksumLen 
and dataLen  size remaining: 22 data len: 20 checksum Len: 4
        at 
org.apache.hadoop.hdfs.server.datanode.BlockReceiver.receivePacket(BlockReceiver.java:595)
        at 
org.apache.hadoop.hdfs.server.datanode.BlockReceiver.receivePacket(BlockReceiver.java:532)
        at 
org.apache.hadoop.hdfs.server.datanode.BlockReceiver.receiveBlock(BlockReceiver.java:748)
{code}
                
> hsync support broke wire compatibility
> --------------------------------------
>
>                 Key: HDFS-3721
>                 URL: https://issues.apache.org/jira/browse/HDFS-3721
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: data-node, hdfs client
>    Affects Versions: 2.1.0-alpha
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>
> HDFS-744 added support for hsync to the data transfer wire protocol. However, 
> it actually broke wire compatibility: if the client has hsync support but the 
> server does not, the client cannot write to the old cluster.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to