You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "dhruba borthakur (JIRA)" <ji...@apache.org> on 2007/11/26 09:02:48 UTC

[jira] Created: (HADOOP-2275) Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block

Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block
-------------------------------------------------------------------------------------------------------------

                 Key: HADOOP-2275
                 URL: https://issues.apache.org/jira/browse/HADOOP-2275
             Project: Hadoop
          Issue Type: Bug
          Components: dfs
    Affects Versions: 0.15.0
            Reporter: dhruba borthakur
            Assignee: dhruba borthakur


It can so happen that the namenode allocated a block for a file and then fails to allocate any datanode for this block. The namenode delivers an exception to the client. The client retries. But the block remains associated with the file (until lease expiration). This causes all client retries to fail.

An fsck (before the lease expires) reports this block as a missing block.


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


[jira] Updated: (HADOOP-2275) Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

dhruba borthakur updated HADOOP-2275:
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.16.0
           Status: Resolved  (was: Patch Available)

I just committed this.

> Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-2275
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2275
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.15.0
>            Reporter: dhruba borthakur
>            Assignee: dhruba borthakur
>             Fix For: 0.16.0
>
>         Attachments: badBlocks1.patch, badBlocks1.patch
>
>
> It can so happen that the namenode allocated a block for a file and then fails to allocate any datanode for this block. The namenode delivers an exception to the client. The client retries. But the block remains associated with the file (until lease expiration). This causes all client retries to fail.
> An fsck (before the lease expires) reports this block as a missing block.

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


[jira] Updated: (HADOOP-2275) Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

dhruba borthakur updated HADOOP-2275:
-------------------------------------

    Status: Patch Available  (was: Open)

> Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-2275
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2275
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.15.0
>            Reporter: dhruba borthakur
>            Assignee: dhruba borthakur
>         Attachments: badBlocks1.patch, badBlocks1.patch
>
>
> It can so happen that the namenode allocated a block for a file and then fails to allocate any datanode for this block. The namenode delivers an exception to the client. The client retries. But the block remains associated with the file (until lease expiration). This causes all client retries to fail.
> An fsck (before the lease expires) reports this block as a missing block.

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


[jira] Commented: (HADOOP-2275) Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545663 ] 

dhruba borthakur commented on HADOOP-2275:
------------------------------------------

If you call chooseTarget first, then you would need to acquire the FSnamesystem lock twice.... first time to get the replication factor of the file and then the second time to insert the block into the INode. This will happen for the normal code flow path.

On the other hand, the current patch needs to acquire the fsnamesystem global lock twice only in the case of error. The normal code flow path remains unaffected.

> Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-2275
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2275
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.15.0
>            Reporter: dhruba borthakur
>            Assignee: dhruba borthakur
>         Attachments: badBlocks1.patch, badBlocks1.patch
>
>
> It can so happen that the namenode allocated a block for a file and then fails to allocate any datanode for this block. The namenode delivers an exception to the client. The client retries. But the block remains associated with the file (until lease expiration). This causes all client retries to fail.
> An fsck (before the lease expires) reports this block as a missing block.

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


[jira] Commented: (HADOOP-2275) Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block

Posted by "Raghu Angadi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545660 ] 

Raghu Angadi commented on HADOOP-2275:
--------------------------------------

Would it be better to first chooseTarget() and then allocate a new block? In that case, you don't need to remove the block from the file.

> Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-2275
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2275
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.15.0
>            Reporter: dhruba borthakur
>            Assignee: dhruba borthakur
>         Attachments: badBlocks1.patch, badBlocks1.patch
>
>
> It can so happen that the namenode allocated a block for a file and then fails to allocate any datanode for this block. The namenode delivers an exception to the client. The client retries. But the block remains associated with the file (until lease expiration). This causes all client retries to fail.
> An fsck (before the lease expires) reports this block as a missing block.

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


[jira] Commented: (HADOOP-2275) Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546323 ] 

Hadoop QA commented on HADOOP-2275:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
http://issues.apache.org/jira/secure/attachment/12370226/badBlocks1.patch
against trunk revision r598984.

    @author +1.  The patch does not contain any @author tags.

    javadoc +1.  The javadoc tool did not generate any warning messages.

    javac +1.  The applied patch does not generate any new compiler warnings.

    findbugs +1.  The patch does not introduce any new Findbugs warnings.

    core tests -1.  The patch failed core unit tests.

    contrib tests -1.  The patch failed contrib unit tests.

Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1189/testReport/
Findbugs warnings: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1189/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1189/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1189/console

This message is automatically generated.

> Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-2275
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2275
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.15.0
>            Reporter: dhruba borthakur
>            Assignee: dhruba borthakur
>         Attachments: badBlocks1.patch, badBlocks1.patch
>
>
> It can so happen that the namenode allocated a block for a file and then fails to allocate any datanode for this block. The namenode delivers an exception to the client. The client retries. But the block remains associated with the file (until lease expiration). This causes all client retries to fail.
> An fsck (before the lease expires) reports this block as a missing block.

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


[jira] Updated: (HADOOP-2275) Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

dhruba borthakur updated HADOOP-2275:
-------------------------------------

    Status: Patch Available  (was: Open)

> Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-2275
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2275
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.15.0
>            Reporter: dhruba borthakur
>            Assignee: dhruba borthakur
>         Attachments: badBlocks1.patch, badBlocks1.patch
>
>
> It can so happen that the namenode allocated a block for a file and then fails to allocate any datanode for this block. The namenode delivers an exception to the client. The client retries. But the block remains associated with the file (until lease expiration). This causes all client retries to fail.
> An fsck (before the lease expires) reports this block as a missing block.

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


[jira] Commented: (HADOOP-2275) Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546476 ] 

Hadoop QA commented on HADOOP-2275:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
http://issues.apache.org/jira/secure/attachment/12370226/badBlocks1.patch
against trunk revision r599162.

    @author +1.  The patch does not contain any @author tags.

    javadoc +1.  The javadoc tool did not generate any warning messages.

    javac +1.  The applied patch does not generate any new compiler warnings.

    findbugs +1.  The patch does not introduce any new Findbugs warnings.

    core tests +1.  The patch passed core unit tests.

    contrib tests -1.  The patch failed contrib unit tests.

Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1193/testReport/
Findbugs warnings: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1193/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1193/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/1193/console

This message is automatically generated.

> Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-2275
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2275
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.15.0
>            Reporter: dhruba borthakur
>            Assignee: dhruba borthakur
>         Attachments: badBlocks1.patch, badBlocks1.patch
>
>
> It can so happen that the namenode allocated a block for a file and then fails to allocate any datanode for this block. The namenode delivers an exception to the client. The client retries. But the block remains associated with the file (until lease expiration). This causes all client retries to fail.
> An fsck (before the lease expires) reports this block as a missing block.

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


[jira] Updated: (HADOOP-2275) Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

dhruba borthakur updated HADOOP-2275:
-------------------------------------

    Attachment: badBlocks1.patch

If the namenode fails to allocate any datanode for a newly allocated block, it removes that block from the file before returning an exception to the client.

> Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-2275
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2275
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.15.0
>            Reporter: dhruba borthakur
>            Assignee: dhruba borthakur
>         Attachments: badBlocks1.patch
>
>
> It can so happen that the namenode allocated a block for a file and then fails to allocate any datanode for this block. The namenode delivers an exception to the client. The client retries. But the block remains associated with the file (until lease expiration). This causes all client retries to fail.
> An fsck (before the lease expires) reports this block as a missing block.

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


[jira] Updated: (HADOOP-2275) Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

dhruba borthakur updated HADOOP-2275:
-------------------------------------

    Status: Open  (was: Patch Available)

> Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-2275
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2275
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.15.0
>            Reporter: dhruba borthakur
>            Assignee: dhruba borthakur
>         Attachments: badBlocks1.patch, badBlocks1.patch
>
>
> It can so happen that the namenode allocated a block for a file and then fails to allocate any datanode for this block. The namenode delivers an exception to the client. The client retries. But the block remains associated with the file (until lease expiration). This causes all client retries to fail.
> An fsck (before the lease expires) reports this block as a missing block.

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


[jira] Commented: (HADOOP-2275) Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block

Posted by "Raghu Angadi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545687 ] 

Raghu Angadi commented on HADOOP-2275:
--------------------------------------

Thats right. +1 for the patch.


> Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-2275
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2275
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.15.0
>            Reporter: dhruba borthakur
>            Assignee: dhruba borthakur
>         Attachments: badBlocks1.patch, badBlocks1.patch
>
>
> It can so happen that the namenode allocated a block for a file and then fails to allocate any datanode for this block. The namenode delivers an exception to the client. The client retries. But the block remains associated with the file (until lease expiration). This causes all client retries to fail.
> An fsck (before the lease expires) reports this block as a missing block.

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


[jira] Commented: (HADOOP-2275) Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547101 ] 

Hudson commented on HADOOP-2275:
--------------------------------

Integrated in Hadoop-Nightly #318 (See [http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Nightly/318/])

> Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-2275
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2275
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.15.0
>            Reporter: dhruba borthakur
>            Assignee: dhruba borthakur
>             Fix For: 0.16.0
>
>         Attachments: badBlocks1.patch, badBlocks1.patch
>
>
> It can so happen that the namenode allocated a block for a file and then fails to allocate any datanode for this block. The namenode delivers an exception to the client. The client retries. But the block remains associated with the file (until lease expiration). This causes all client retries to fail.
> An fsck (before the lease expires) reports this block as a missing block.

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


[jira] Updated: (HADOOP-2275) Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block

Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

dhruba borthakur updated HADOOP-2275:
-------------------------------------

    Attachment: badBlocks1.patch

> Erroneous detection of corrupted file when namenode fails to allocate any datanodes for newly allocated block
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-2275
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2275
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.15.0
>            Reporter: dhruba borthakur
>            Assignee: dhruba borthakur
>         Attachments: badBlocks1.patch, badBlocks1.patch
>
>
> It can so happen that the namenode allocated a block for a file and then fails to allocate any datanode for this block. The namenode delivers an exception to the client. The client retries. But the block remains associated with the file (until lease expiration). This causes all client retries to fail.
> An fsck (before the lease expires) reports this block as a missing block.

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