[
https://issues.apache.org/jira/browse/HDFS-9050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14739721#comment-14739721
]
Zhe Zhang commented on HDFS-9050:
---------------------------------
Thanks Jing for the feedback. Wire incompatibility is a good point that I
overlooked.
Then should we remove the logic of changing the {{numBytes}} of the block, and
instead verify it's the same as the old block? Something like:
{code}
// check new GS & length: this is not expected
if (newBlock.getGenerationStamp() <= blockinfo.getGenerationStamp() ||
newBlock.getNumBytes() != blockinfo.getNumBytes()) {
String msg = "Update " + oldBlock + " (len = " +
blockinfo.getNumBytes() + ", GS = " + blockinfo.getGenerationStamp() +
") to an older state or inconsistent size: " + newBlock +
" (len = " + newBlock.getNumBytes() + ", GS = " +
newBlock.getGenerationStamp() + ")";
LOG.warn(msg);
throw new IOException(msg);
}
// Update old block with the new generation stamp
blockinfo.setGenerationStampAndVerifyReplicas(newBlock.getGenerationStamp());
{code}
> updatePipeline RPC call should only update the GS of the block
> --------------------------------------------------------------
>
> Key: HDFS-9050
> URL: https://issues.apache.org/jira/browse/HDFS-9050
> Project: Hadoop HDFS
> Issue Type: Improvement
> Affects Versions: 2.7.1
> Reporter: Zhe Zhang
> Assignee: Zhe Zhang
> Attachments: HDFS-9050.00.patch
>
>
> The only usage of the call is in {{DataStreamer#updatePipeline}}, where
> {{newBlock}} differs from current {{block}} only in GS.
> Basically the RPC call is not supposed to update the {{poolID}}, {{ID}}, or
> {{numBytes}} of the block on NN.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)