You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Sijie Guo (Issue Comment Edited) (JIRA)" <ji...@apache.org> on 2012/02/01 15:42:58 UTC

[jira] [Issue Comment Edited] (BOOKKEEPER-156) BookieJournalRollingTest failing

    [ https://issues.apache.org/jira/browse/BOOKKEEPER-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197875#comment-13197875 ] 

Sijie Guo edited comment on BOOKKEEPER-156 at 2/1/12 2:42 PM:
--------------------------------------------------------------

hmm, it seems that 3 bookie are up but bkc can't read enough bookies.

in BaseTestCase#startNewBookie, it waits until the bookie znode is available. but it didn't in BaseTestCase#restartBookies.

{code}
    protected void startNewBookie(int port)
            throws IOException, InterruptedException, KeeperException {
        File f = File.createTempFile("bookie", "test");
        tmpDirs.add(f);
        f.delete();
        f.mkdir();

        ServerConfiguration conf = newServerConfiguration(port, HOSTPORT, f, new File[] { f }); 

        BookieServer server = new BookieServer(conf);
        server.start();
        bs.add(server);

        while(bkc.getZkHandle().exists("/ledgers/available/" + InetAddress.getLocalHost().getHostAddress() + ":" + port,    false) == null) {
            Thread.sleep(500);
        }   

        bkc.readBookiesBlocking();
        LOG.info("New bookie on port " + port + " has been created.");
    } 
{code}

change #restartBookies to use #startNewBookie may resolve this issue.
                
      was (Author: hustlmsp):
    hmm, it seems that 3 bookie are up but bkc can't read enough bookies.

in BaseTestCase#startNewBookie, it waits until the bookie znode is available. but it didn't in BaseTestCase#restartBookies.

<code>
    protected void startNewBookie(int port)
            throws IOException, InterruptedException, KeeperException {
        File f = File.createTempFile("bookie", "test");
        tmpDirs.add(f);
        f.delete();
        f.mkdir();

        ServerConfiguration conf = newServerConfiguration(port, HOSTPORT, f, new File[] { f }); 

        BookieServer server = new BookieServer(conf);
        server.start();
        bs.add(server);

        while(bkc.getZkHandle().exists("/ledgers/available/" + InetAddress.getLocalHost().getHostAddress() + ":" + port,    false) == null) {
            Thread.sleep(500);
        }   

        bkc.readBookiesBlocking();
        LOG.info("New bookie on port " + port + " has been created.");
    } 
</code>

change #restartBookies to use #startNewBookie may resolve this issue.
                  
> BookieJournalRollingTest failing 
> ---------------------------------
>
>                 Key: BOOKKEEPER-156
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-156
>             Project: Bookkeeper
>          Issue Type: Bug
>    Affects Versions: 4.0.0
>            Reporter: Flavio Junqueira
>             Fix For: 4.1.0
>
>         Attachments: org.apache.bookkeeper.test.BookieJournalRollingTest-output.txt
>
>
> The test fails for me intermittently. 

--
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