hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hairong Kuang (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HDFS-145) FSNameSystem#addStoredBlock does not handle inconsistent block length correctly
Date Mon, 11 Jan 2010 22:04:54 GMT

     [ https://issues.apache.org/jira/browse/HDFS-145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Hairong Kuang updated HDFS-145:

    Attachment: corruptionDetect1.patch

This patch removes the unnecessary import.

The reason that I removed the testcase TestFileCreation is that the following assumption that
it based is wrong:
  // The test file is 2 times the blocksize plus one. This means that when the
  // entire file is written, the first two blocks definitely get flushed to
  // the datanodes.

When an application returns from writing "2 blocks +1" bytes of data, HDFS does not provide
any guarantee where the data is unless hflush is called. It is possible the data still buffer
at the client side. 

> FSNameSystem#addStoredBlock does not handle inconsistent block length correctly
> -------------------------------------------------------------------------------
>                 Key: HDFS-145
>                 URL: https://issues.apache.org/jira/browse/HDFS-145
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 0.21.0
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.21.0, 0.22.0
>         Attachments: corruptionDetect.patch, corruptionDetect1.patch, inconsistentLen.patch,
inconsistentLen1.patch, inconsistentLen2.patch
> Currently NameNode treats either the new replica or existing replicas as corrupt if the
new replica's length is inconsistent with NN recorded block length. The correct behavior should
> 1. For a block that is not under construction, the new replica should be marked as corrupt
if its length is inconsistent (no matter shorter or longer) with the NN recorded block length;
> 2. For an under construction block, if the new replica's length is shorter than the NN
recorded block length, the new replica could be marked as corrupt; if the new replica's length
is longer, NN should update its recorded block length. But it should not mark existing replicas
as corrupt. This is because NN recorded length for an under construction block does not accurately
match the block length on datanode disk. NN should not judge an under construction replica
to be corrupt by looking at the inaccurate information:  its recorded block length.

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

View raw message