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

Hongchao Deng commented on ZOOKEEPER-1992:
------------------------------------------

[~shralex]
Could you give more details about your method? I will try to make it work.

{quote}
Silently prioritizing the dynamic port and removing the conflicting static port 
to solve the inconsistency may be a surprise to the user.
{quote}

As we discussed before, what happened in reconfig client port is that if there 
is client port in static file, it is gonna remove that one from static file 
too. But my worry is that this requires much consideration on consistency in 
removing the line and updating the dynamic file.

So my plan is that:
1. Keep the client port on fresh boot for backward compatibility.
Then what happens if the server reconfig itself client port? Well, I plan for 
two tasks, where the second task is gonna replace the first one finally.
2.1 Since it will updates the client port in dynamic file, making a preference 
on dynamic file over static file is a hackish way to finish it. Not 
delete/remove here. This would be quick and make out a release. This is part of 
ZOOKEEPRE-1993
2.2 (This one is difficult and I need more time to get through the code.) 
Basically, on reconfiguring the client port on itself, it should safely remove 
the client port, update the dynamic file. This is part of ZOOKEEPRE-1995

Does that make sense? Please let me know what you think might be proper 
solution.

> backward compatibility of zoo.cfg
> ---------------------------------
>
>                 Key: ZOOKEEPER-1992
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1992
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.5.0
>            Reporter: Hongchao Deng
>            Assignee: Hongchao Deng
>            Priority: Blocker
>             Fix For: 3.5.0
>
>
> This issue supersedes our discussion in ZOOKEEPER-1989.
> To summarize, ZK users can seamlessly upgrade 3.4 to 3.5. But two things will 
> happen:
> 1. the server list will be separated out as a dynamic file (the original 
> should be backup automatically).
> 2. Client port is mandatory on reconfig. So when reconfig the server itself 
> (its id), the client port in config file will be removed and replaced by the 
> one in reconfig (written in dynamic file).



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to