You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Todd Lipcon (Created) (JIRA)" <ji...@apache.org> on 2012/01/10 20:27:41 UTC

[jira] [Created] (HDFS-2775) HA: TestStandbyCheckpoints.testBothNodesInStandbyState fails intermittently

HA: TestStandbyCheckpoints.testBothNodesInStandbyState fails intermittently
---------------------------------------------------------------------------

                 Key: HDFS-2775
                 URL: https://issues.apache.org/jira/browse/HDFS-2775
             Project: Hadoop HDFS
          Issue Type: Sub-task
          Components: ha, test
    Affects Versions: HA branch (HDFS-1623)
            Reporter: Todd Lipcon
            Assignee: Todd Lipcon


This test is failing periodically on this assertion:
{code}
    assertEquals(12, nn0.getNamesystem().getFSImage().getStorage()
        .getMostRecentCheckpointTxId());
{code}
My guess is it's a test race. Investigating...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2775) HA: TestStandbyCheckpoints.testBothNodesInStandbyState fails intermittently

Posted by "Aaron T. Myers (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183702#comment-13183702 ] 

Aaron T. Myers commented on HDFS-2775:
--------------------------------------

+1, the patch looks good to me.

Should {{FSImage#getMostRecentCheckpointTxId}} perhaps be marked {{@VisibleForTesting}}?
                
> HA: TestStandbyCheckpoints.testBothNodesInStandbyState fails intermittently
> ---------------------------------------------------------------------------
>
>                 Key: HDFS-2775
>                 URL: https://issues.apache.org/jira/browse/HDFS-2775
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ha, test
>    Affects Versions: HA branch (HDFS-1623)
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>         Attachments: hdfs-2775.txt
>
>
> This test is failing periodically on this assertion:
> {code}
>     assertEquals(12, nn0.getNamesystem().getFSImage().getStorage()
>         .getMostRecentCheckpointTxId());
> {code}
> My guess is it's a test race. Investigating...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2775) HA: TestStandbyCheckpoints.testBothNodesInStandbyState fails intermittently

Posted by "Todd Lipcon (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183502#comment-13183502 ] 

Todd Lipcon commented on HDFS-2775:
-----------------------------------

Yes, this just a test race. The issue is that the checkpoint is saved to storage, and only after that is {{mostRecentCheckpointTxId}} updated. So, the test sees the checkpoint and then the assert fails. We should probably fix this with some simple synchronization - but it's only a test problem and not a code issue.
                
> HA: TestStandbyCheckpoints.testBothNodesInStandbyState fails intermittently
> ---------------------------------------------------------------------------
>
>                 Key: HDFS-2775
>                 URL: https://issues.apache.org/jira/browse/HDFS-2775
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ha, test
>    Affects Versions: HA branch (HDFS-1623)
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>
> This test is failing periodically on this assertion:
> {code}
>     assertEquals(12, nn0.getNamesystem().getFSImage().getStorage()
>         .getMostRecentCheckpointTxId());
> {code}
> My guess is it's a test race. Investigating...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2775) HA: TestStandbyCheckpoints.testBothNodesInStandbyState fails intermittently

Posted by "Todd Lipcon (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183900#comment-13183900 ] 

Todd Lipcon commented on HDFS-2775:
-----------------------------------

bq. Should FSImage#getMostRecentCheckpointTxId perhaps be marked @VisibleForTesting?

Eh, I don't see any reason it shouldn't be used elsewhere in the code either. I generally try to only use that when you're exposing some piece of internal state that shouldn't normally be used from the main non-test code.
                
> HA: TestStandbyCheckpoints.testBothNodesInStandbyState fails intermittently
> ---------------------------------------------------------------------------
>
>                 Key: HDFS-2775
>                 URL: https://issues.apache.org/jira/browse/HDFS-2775
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ha, test
>    Affects Versions: HA branch (HDFS-1623)
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>             Fix For: HA branch (HDFS-1623)
>
>         Attachments: hdfs-2775.txt
>
>
> This test is failing periodically on this assertion:
> {code}
>     assertEquals(12, nn0.getNamesystem().getFSImage().getStorage()
>         .getMostRecentCheckpointTxId());
> {code}
> My guess is it's a test race. Investigating...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HDFS-2775) HA: TestStandbyCheckpoints.testBothNodesInStandbyState fails intermittently

Posted by "Todd Lipcon (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-2775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HDFS-2775:
------------------------------

    Attachment: hdfs-2775.txt

Simple fix - makes the call for {{getMostRecentCheckpointTxId}} go through FSImage, where it can be synchronized against the saveNamespace call. I verified the fix by adding a sleep before setting {{mostRecentCheckpointTxId}} - it used to make the test fail reliably, but now the test  passes regardless.
                
> HA: TestStandbyCheckpoints.testBothNodesInStandbyState fails intermittently
> ---------------------------------------------------------------------------
>
>                 Key: HDFS-2775
>                 URL: https://issues.apache.org/jira/browse/HDFS-2775
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ha, test
>    Affects Versions: HA branch (HDFS-1623)
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>         Attachments: hdfs-2775.txt
>
>
> This test is failing periodically on this assertion:
> {code}
>     assertEquals(12, nn0.getNamesystem().getFSImage().getStorage()
>         .getMostRecentCheckpointTxId());
> {code}
> My guess is it's a test race. Investigating...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-2775) HA: TestStandbyCheckpoints.testBothNodesInStandbyState fails intermittently

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-2775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13184036#comment-13184036 ] 

Hudson commented on HDFS-2775:
------------------------------

Integrated in Hadoop-Hdfs-HAbranch-build #44 (See [https://builds.apache.org/job/Hadoop-Hdfs-HAbranch-build/44/])
    HDFS-2775. Fix TestStandbyCheckpoints.testBothNodesInStandbyState failing intermittently. Contributed by Todd Lipcon.

todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1229901
Files : 
* /hadoop/common/branches/HDFS-1623/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-1623.txt
* /hadoop/common/branches/HDFS-1623/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java
* /hadoop/common/branches/HDFS-1623/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestStandbyCheckpoints.java

                
> HA: TestStandbyCheckpoints.testBothNodesInStandbyState fails intermittently
> ---------------------------------------------------------------------------
>
>                 Key: HDFS-2775
>                 URL: https://issues.apache.org/jira/browse/HDFS-2775
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ha, test
>    Affects Versions: HA branch (HDFS-1623)
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>             Fix For: HA branch (HDFS-1623)
>
>         Attachments: hdfs-2775.txt
>
>
> This test is failing periodically on this assertion:
> {code}
>     assertEquals(12, nn0.getNamesystem().getFSImage().getStorage()
>         .getMostRecentCheckpointTxId());
> {code}
> My guess is it's a test race. Investigating...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (HDFS-2775) HA: TestStandbyCheckpoints.testBothNodesInStandbyState fails intermittently

Posted by "Todd Lipcon (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-2775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon resolved HDFS-2775.
-------------------------------

       Resolution: Fixed
    Fix Version/s: HA branch (HDFS-1623)
     Hadoop Flags: Reviewed

Committed to branch, thx.
                
> HA: TestStandbyCheckpoints.testBothNodesInStandbyState fails intermittently
> ---------------------------------------------------------------------------
>
>                 Key: HDFS-2775
>                 URL: https://issues.apache.org/jira/browse/HDFS-2775
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ha, test
>    Affects Versions: HA branch (HDFS-1623)
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>             Fix For: HA branch (HDFS-1623)
>
>         Attachments: hdfs-2775.txt
>
>
> This test is failing periodically on this assertion:
> {code}
>     assertEquals(12, nn0.getNamesystem().getFSImage().getStorage()
>         .getMostRecentCheckpointTxId());
> {code}
> My guess is it's a test race. Investigating...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira