[ https://issues.apache.org/jira/browse/HDFS-7748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14372149#comment-14372149 ]
Haohui Mai commented on HDFS-7748: ---------------------------------- {code} - public PipelineAck(long seqno, int[] replies, - long downstreamAckTimeNanos) { - ArrayList<Integer> replyList = Lists.newArrayList(); - for (int r : replies) { - replyList.add(r); - } - proto = PipelineAckProto.newBuilder() + public PipelineAck(long seqno, Status[] replies, + long downstreamAckTimeNanos, + int flag) { + + PipelineAckProto.Builder protoBuilder = PipelineAckProto.newBuilder() .setSeqno(seqno) - .addAllReply(replyList) - .setDownstreamAckTimeNanos(downstreamAckTimeNanos) - .build(); + .addAllStatus(Arrays.asList(replies)) + .setDownstreamAckTimeNanos(downstreamAckTimeNanos); + + if (flag != Flags.ECN_DISABLED_VALUE) { + protoBuilder.setFlags(0,flag); + } {code} Note that the ECN flag needs to be preserved through the whole pipeline -- which means that the array should contain the ECN status for all nodes that are involved in the pipeline. > Separate ECN flags from the Status in the DataTransferPipelineAck > ----------------------------------------------------------------- > > Key: HDFS-7748 > URL: https://issues.apache.org/jira/browse/HDFS-7748 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Haohui Mai > Assignee: Anu Engineer > Priority: Blocker > Attachments: hdfs-7748.001.patch, hdfs-7748.002.patch, > hdfs-7748.003.patch, hdfs-7748.004.patch > > > Prior to the discussions on HDFS-7270, the old clients might fail to talk to > the newer server when ECN is turned on. This jira proposes to separate the > ECN flags in a separate protobuf field to make the ack compatible on both > versions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)