hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andras Bokor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2173) saveNamespace should not throw IOE when only one storage directory fails to write VERSION file
Date Thu, 28 Apr 2016 17:15:13 GMT

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

Andras Bokor commented on HDFS-2173:
------------------------------------

[~tlipcon] I checked this test and currently it fails before it could throw an IOE or RTE.
So currently the test itself is incorrect.
The problem is in that block:
{code}case WRITE_STORAGE_ONE:
      // The spy throws on exception on one particular storage directory
      doAnswer(new FaultySaveImage(true))
        .when(spyStorage).writeProperties((StorageDirectory)anyObject());
      // TODO: unfortunately this fails -- should be improved.
      // See HDFS-2173.
      shouldFail = true;
      break;{code}

Here we mock {code}writeProperties{code} with one parameter. But above in answer method we
try to get the second argument with {code}StorageDirectory sd = (StorageDirectory)args[1];{code}

I would fix this in a separated JIRA but I am not sure if I understand well the happy path
of the test case.
As I understand when the writeProperties is called second time an RTE should be thrown.

Is it the original purpose of the test?

> saveNamespace should not throw IOE when only one storage directory fails to write VERSION
file
> ----------------------------------------------------------------------------------------------
>
>                 Key: HDFS-2173
>                 URL: https://issues.apache.org/jira/browse/HDFS-2173
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>    Affects Versions: Edit log branch (HDFS-1073), 0.23.0
>            Reporter: Todd Lipcon
>
> This JIRA tracks a TODO in TestSaveNamespace. Currently, if, while writing the VERSION
files in the storage directories, one of the directories fails, the entire operation throws
IOE. This is unnecessary -- instead, just that directory should be marked as failed.
> This is targeted to be fixed _after_ HDFS-1073 is merged to trunk, since it does not
ever dataloss, and would rarely occur in practice (the dir would have to fail between writing
the fsimage file and writing VERSION)



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

Mime
View raw message