[
https://issues.apache.org/jira/browse/HDFS-14551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16888494#comment-16888494
]
Yuxuan Wang commented on HDFS-14551:
------------------------------------
I have created a PR. And we need backport it to 2.x which we support
downgrading.
Hi, [~brahmareddy]. I find you work on upgrading compatibility. Do you have an
interest in this issue?
> NN throws NPE if downgrade it during rolling upgrade from 3.x to 2.x
> --------------------------------------------------------------------
>
> Key: HDFS-14551
> URL: https://issues.apache.org/jira/browse/HDFS-14551
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Yuxuan Wang
> Priority: Major
>
> We can downgrade NN during roling upgrade (runned "hdfs dfsadmin
> -rollingUpgrade prepare) with HDFS-8432 involved. But with HDFS-14172 if the
> image has any unrecogized section, it will throw IOException at
> {code:title=FSImageFormatProtobuf.java|borderStyle=solid}
> private void loadInternal(......) {
> ......
> String n = s.getName();
> SectionName sectionName = SectionName.fromString(n);
> if (sectionName == null) {
> throw new IOException("Unrecognized section " + n);
> }
> ......
> }
> {code}
> and throw NPE on Hadoop 2.x
> {code:title=FSImageFormatProtobuf.java|borderStyle=solid}
> private void loadInternal(......) {
> ......
> String n = s.getName();
> switch (sectionName)
> ......
> }
> {code}
> When we downgrade NN from 3.x to 2.x, NN may load the image saved by 3.x NN.
> Then the lack of {{SectionName.ERASURE_CODING}} can break 2.x NN.
> We should just skip the unrecogized section instead of throwing exception.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]