You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Erik Krogen (JIRA)" <ji...@apache.org> on 2019/07/23 14:58:03 UTC

[jira] [Updated] (HDFS-14551) NN throws NPE if downgrade it during rolling upgrade from 3.x to 2.x

     [ https://issues.apache.org/jira/browse/HDFS-14551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erik Krogen updated HDFS-14551:
-------------------------------
    Target Version/s: 2.10.0
            Priority: Blocker  (was: Major)

> 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: Blocker
>
> 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: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org