[
https://issues.apache.org/jira/browse/BOOKKEEPER-787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14144613#comment-14144613
]
Ivan Kelly commented on BOOKKEEPER-787:
---------------------------------------
You don't need to get the version back when doing Version.NEW.
There's only a limited number of scenarios where we do a writeToZookeeper:
1. Initial formatting (using Version.NEW)
2. Rollback upgrade, which should be a delete (using the version returned by
readFromZookeeper)
3. Updating bookieId (using the version returned by readFromZookeeper)
Regarding using ZkVersion, you will be getting the Version object from the
Versioned<Cookie> which is returned from readFromZookeeper. So you would have
to do a cast somewhere. It would be cleaner to do the cast inside
writeToZookeeper (and deleteFromZookeeper), and throw a
IllegalArgumentException if anything that can't be cast to ZkVersion is passed.
> Modify Cookie by removing 'znodeVersion' state/field
> ----------------------------------------------------
>
> Key: BOOKKEEPER-787
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-787
> Project: Bookkeeper
> Issue Type: Sub-task
> Components: bookkeeper-server
> Reporter: Rakesh R
> Assignee: Rakesh R
> Fix For: 4.3.0
>
>
> The idea is to make Versioned<Cookie> instead of maintaining 'znodeVersion'
> by Cookie.
> Please see the [discussion
> thread|https://issues.apache.org/jira/browse/BOOKKEEPER-773?focusedCommentId=14143263&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14143263]
> for more details.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)