hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill de hOra (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-3614) TestLeaseRecovery fails when run with assertions enabled.
Date Sun, 03 Aug 2008 17:55:44 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-3614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619354#action_12619354

Bill de hOra commented on HADOOP-3614:

When I step through the tests I see that 1001L is the value of the generationStamp for newblocks[i]

      //update blocks with random block sizes
      Block[] newblocks = new Block[REPLICATION_NUM];
      for(int i = 0; i < REPLICATION_NUM; i++) {
        newblocks[i] = new Block(lastblock.getBlockId(), newblocksizes[i],
        idps[i].updateBlock(lastblock, newblocks[i], false);
        checkMetaInfo(newblocks[i], idps[i]);

when that gets to  FSDataset.findBlockFile the assert line in evaluates to 1 != 1001L because
GenerationStamp.WILDCARD_STAMP is 1. I'm assuming the 1001L value is being calculated as an
offset from GenerationStamp.FIRST_VALID_STAMP (which is 1000L) and 1001L comes from using
the GenerationStamp.nextStamp() method.

That part of the code was last touched in r673857 as part of HADOOP-2885, where findBlockFile
was made public. Trawling the commits it looks like the assert was added as part of HADOOP-3310
(r662513; I wish svn had bisect). 

What I don't understand is why the assert line is there; I don't see how it could ever work
where stamps are actually being calculated. I suspect the assert needs to come out and you
just might be the first person to run with assert on. 

> TestLeaseRecovery fails when run with assertions enabled.
> ---------------------------------------------------------
>                 Key: HADOOP-3614
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3614
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.18.0
>            Reporter: Konstantin Shvachko
>             Fix For: 0.19.0
> I used -ea jvm options to run the test, and it fails in FSDataset.findBlockFile(Block)
> {code}
> assert b.generationStamp == GenerationStamp.WILDCARD_STAMP;
> {code}
> Without asserts on the test passes.

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

View raw message