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

Tsz Wo Nicholas Sze commented on HDFS-9730:
-------------------------------------------

Hi [~kihwal], thanks for reporting this.

> This is because createStorageID() is no longer called when it goes through 
> the layout upgrade path.

We still call createStorageID(..) the upgrade path.  The call is moved to 
doUgrade(..) as  shown below (line 802 in DataStorage).

{code}
@@ -784,7 +798,8 @@ void doUpgrade(DataNode datanode, StorageDirectory sd, 
NamespaceInfo nsInfo)
     // 5. Rename <SD>/previous.tmp to <SD>/previous
     rename(tmpDir, prevDir);
     LOG.info("Upgrade of " + sd.getRoot()+ " is complete");
-    addBlockPoolStorage(nsInfo.getBlockPoolID(), bpStorage);
+
+    createStorageID(sd, layoutVersion);
   }
{code}


> Storage ID update does not happen when there is a layout change
> ---------------------------------------------------------------
>
>                 Key: HDFS-9730
>                 URL: https://issues.apache.org/jira/browse/HDFS-9730
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Kihwal Lee
>            Assignee: Tsz Wo Nicholas Sze
>
> HDFS-9654 will cause test failures when we increment the datanode layout 
> version next time.
> {noformat}
> TestDatanodeStartupFixesLegacyStorageIDs#testUpgradeFrom22via26FixesStorageIDs
> TestDatanodeStartupFixesLegacyStorageIDs#testUpgradeFrom22FixesStorageIDs
> {noformat}
> This is because createStorageID() is no longer called when it goes through 
> the layout upgrade path. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to