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:
      // The spy throws on exception on one particular storage directory
      doAnswer(new FaultySaveImage(true))
      // TODO: unfortunately this fails -- should be improved.
      // See HDFS-2173.
      shouldFail = true;

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
> ----------------------------------------------------------------------------------------------
>                 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

View raw message