You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Vinay (JIRA)" <ji...@apache.org> on 2013/12/06 07:57:35 UTC

[jira] [Created] (BOOKKEEPER-713) Bookie should store the cookie in zookeeper first

Vinay created BOOKKEEPER-713:
--------------------------------

             Summary: Bookie should store the cookie in zookeeper first
                 Key: BOOKKEEPER-713
                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-713
             Project: Bookkeeper
          Issue Type: Bug
          Components: bookkeeper-server
    Affects Versions: 4.2.2
            Reporter: Vinay


following code in {{Bookie#checkEnvironment(..)}} should store the cookie in zookeeper and then to local disks for {{newEnv}}
{code}            if (newEnv) {
                if (missedCookieDirs.size() > 0) {
                    LOG.debug("Directories missing cookie file are {}", missedCookieDirs);
                    masterCookie.writeToDirectory(journalDirectory);
                    for (File dir : allLedgerDirs) {
                        masterCookie.writeToDirectory(dir);
                    }
                }
                masterCookie.writeToZooKeeper(zk, conf);
            }{code}

Otherwise if the {{masterCookie.writeToZooKeeper(zk, conf);}} fails due to some exception, then bookie cannot start again.



--
This message was sent by Atlassian JIRA
(v6.1#6144)