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

Yuxuan Wang commented on HDFS-14551:
------------------------------------

I can attach a patch if anyone agree with me.

> 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.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to