possible race condition in FSDataset.FSVolume
---------------------------------------------

                 Key: HADOOP-4130
                 URL: https://issues.apache.org/jira/browse/HADOOP-4130
             Project: Hadoop Core
          Issue Type: Bug
          Components: fs
    Affects Versions: 0.19.0
            Reporter: Steve Loughran
            Priority: Minor


This is only a possibility, noticed during reviewing of the possible causes of 
HADOOP-4128.

In the FSDataset.FSVolume constructor, attempts are made to recover from the 
detach and tmp directories

      this.detachDir = new File(parent, "detach");
      if (detachDir.exists()) {
        recoverDetachedBlocks(currentDir, detachDir);

      this.tmpDir = new File(parent, "tmp");
      if (tmpDir.exists()) {
        recoverDetachedBlocks(currentDir, tmpDir);
      }

This is done before the destination directory is created
      this.dataDir = new FSDir(currentDir);
If either ../detach or ../tmp had valid data, but ../current didn't exist, 
recovery could fail without useful messages. Perhaps the existence of 
../current is a prerequisite for recovery?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to