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

Vinay commented on BOOKKEEPER-713:
----------------------------------

Oh.. Sorry.. me too.. I think some problem in my env. 
Zookeeper service was not stable due to network busy.
Bookie Metaformat was failed due to connection loss, one of the bookie started 
without checking for format and for that writing cookie to zookeeper failed 
(again due to zk network problem), by this time it has already written cookies 
to local disks with instanceId as null.
Now one more time format happened and instanceId in zookeeper has created. Now 
restart of the bookie failed with instanceId mismatch.

Need to reformat the local bookie and start.

I will close this issue as invalid.


> 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
>            Assignee: Vinay
>         Attachments: BOOKKEEPER-713.patch
>
>
> 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)

Reply via email to