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

Alexander Shraer commented on ZOOKEEPER-1992:
---------------------------------------------

> Client port is mandatory on reconfig.

I think we don't have to enforce this as part of this JIRA.

How about this:

-In QuorumPeer.writeDynamicConfig, pass a new parameter that indicates that you 
need to delete clientPort and clientPortAddress from the static file (last 
configuration didn't includes a client port for self.getId() but the new one 
has it, you can know that from where you call this function, in 
setQuorumVerifier).
 
- If a failure happens after updating the dynamic file but before you update 
the static file, indeed you could come up and have clientPort and/or 
clientPortAddress in both the static and dynamic files and they could be 
different. If they are different I think we should still raise an error like 
we're doing now and require admin intervention. If they are equal you could 
delete clientPort from the static file in QuorumPeerConfig when the server 
comes up.

My rational is that after the server comes up the two files should be 
consistent and the port is either in the static file or in the dynamic one but 
not in both. Silently prioritizing the dynamic port and removing the 
conflicting static port to solve the inconsistency may be a surprise to the 
user. But actually I don't feel strongly about it. [~phunt], [~michim] which 
way would you prefer ? 

> 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