[
https://issues.apache.org/jira/browse/ZOOKEEPER-1989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14074835#comment-14074835
]
Alexander Shraer commented on ZOOKEEPER-1989:
---------------------------------------------
this is implemented in Leader.lead() (Leader.java). Look for "
if (curQV.getVersion() == 0 && curQV.getVersion() == lastSeenQV.getVersion()) {"
there is a long comment explaining why this is done. Basically the goal is to
distinguish the initial config of a cluster/server that never run (for example
a server trying to join the ensemble and doesn't have a version) from a cluster
that already had a leader established at least once. This version is the zxid
of the new leader message upon boot (this is done only for first boot).
For the purpose of this JIRA I don't think you have to change this part. The
in-memory config (and also the config znode) will have this version, but your
change will prevent it to be written to disk.
BTW, I'm not happy with the idea that different servers will have different
configs with the same version (the configs are different because each server
knows about its client port but not about the others' client ports).
One more thing you may need to change is QuorumPeer.processReconfig() - if
invoked when reconfigEnabled is false it should probably immediately return
false. I'm not sure its necessary, but I don't think it can be bad.
> backward compatibility of zoo.cfg
> ---------------------------------
>
> Key: ZOOKEEPER-1989
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1989
> Project: ZooKeeper
> Issue Type: Sub-task
> Components: tests
> Affects Versions: 3.5.0
> Reporter: Hongchao Deng
> Assignee: Hongchao Deng
> Priority: Blocker
> Fix For: 3.5.0
>
>
> Before 3.5.x, users define zoo.cfg with "clientPort" parameter which is used
> to identify on which port the server is serving clients.
> After upgrading to 3.5.x, the new format:
> {noformat}
> server.$id=$addr:$port1:$port2[:$role];[$cliAddr:]$cliPort
> {noformat}
> force users to define all the client ports on the entire ZK ensemble.
> The goal of this issue is to preserve backward compatibility upgrading 3.4 to
> 3.5.
> 1. when a user defines an old-style config file, it should function the same
> as the old way -- It should use clientPort variable and shouldn't create a
> dynamic file.
> 2. when a user with old-style config file tries to do reconfig relevant jobs,
> it should stop him and give out a warning.
--
This message was sent by Atlassian JIRA
(v6.2#6252)