[
https://issues.apache.org/jira/browse/BOOKKEEPER-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14144887#comment-14144887
]
Rakesh R commented on BOOKKEEPER-773:
-------------------------------------
Created BOOKKEEPER-787 for making Cookie immutable. Thanks
[[email protected]] and [~hustlmsp].
Sometime back there was an offline discussion with [[email protected]] about
cookieupdate algo. Since we are making the Cookie immutable, tried to avoid
setting bookiehost to the oldcookie in zookeeper with few verification steps.
Verification is to make sure that zookeeper and the filesystem is in sync.
+New algo:+
1. prerequisite : update conf useHostNameAsBookieID=true
2. Exec cmd : cookieupdate -bookieId hostname
2.1. check that conf has useHostNameAsBookieID == true. If no return.
2.2. read old cookie, generating a ip based cookie path. If fails all is
fine(cookie is hostname based) just return.
2.3. Verification
2.3.1. check the old cookie matches all the directory cookies. If yes goto 2.4
else goto 2.3.2
2.3.2. check oldcookie == newcookie. If yes all is fine(since we able to read
oldcookie in 2.2, delete oldcookie) else goto 2.5
2.4. update the old cookie, write to all directories (this will prevent startup
if there's a crash half way)
2.5. write the updated cookie to the new zookeeper path
2.6. delete old cookie
[[email protected]] Please feel free to correct if I miss anything.
Appreciate any comments.
> Provide admin tool to rename bookie identifier in Cookies
> ---------------------------------------------------------
>
> Key: BOOKKEEPER-773
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-773
> Project: Bookkeeper
> Issue Type: Sub-task
> Components: bookkeeper-server
> Reporter: Rakesh R
> Assignee: Rakesh R
> Fix For: 4.3.0
>
> Attachments: 001-BOOKKEEPER-773-rename-bookieid-in-cookies.patch,
> 002-BOOKKEEPER-773-rename-bookieid-in-cookies.patch,
> 003-BOOKKEEPER-773-rename-bookieid-in-cookies.patch,
> 004-BOOKKEEPER-773-rename-bookieid.patch,
> 005-BOOKKEEPER-773-rename-bookieid.patch,
> 006-BOOKKEEPER-773-rename-bookieid.patch,
> 007-BOOKKEEPER-773-rename-bookieid.patch,
> 008-BOOKKEEPER-773-rename-bookieid.patch,
> 009-BOOKKEEPER-773-rename-bookieid.patch,
> 010-BOOKKEEPER-773-rename-bookieid.patch
>
>
> The idea of this JIRA to implement a mechanism to efficiently rename the
> bookie identifier present in the Cookies. Cookie information will be present
> in:
> - ledger & journal directories in each Bookie server
> - cookies znode in ZooKeeper
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)