[
https://issues.apache.org/jira/browse/ZOOKEEPER-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440612#comment-13440612
]
Alexander Shraer commented on ZOOKEEPER-1540:
---------------------------------------------
thanks for catching this, Andrew. The fix looks good to me. There is a test
added in 1411 that was supposed to make sure that 1411 doesn't break backward
compatibility
src/java/test/org/apache/zookeeper/server/util/DynamicConfigBCTest.java
I suggest that after config.parse(confFile.toString()) in this file we add
Assert.assertTrue(config.getClientPortAddress() != null
&& config.getClientPortAddress().getPort() ==
CLIENT_PORT_QP1);
this fails without your fix and passes with it.
A related potential backward compatibility issue in 1411 is what to do when the
user has an old-style config file like you describe and then a reconfiguration
happens. In that case I create a dynamic config file automatically and will
remove all relevant definitions from the cfg file (server, group, weight,
clientPort and clientAddress). I'm not sure what's the right thing to do, but
perhaps we shouldn't remove the clientPort and clientAddress from the cfg just
in case they're not specified in the new format. This is also in
QuorumPeerConfig.
> ZOOKEEPER-1411 breaks backwards compatibility
> ---------------------------------------------
>
> Key: ZOOKEEPER-1540
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1540
> Project: ZooKeeper
> Issue Type: Bug
> Reporter: Andrew Ferguson
> Attachments: ZOOKEEPER-1540.patch
>
>
> There is a one-line bug in ZOOKEEPER-1411 which breaks backwards
> compatibility for sites which are using separate configuration files for each
> server. The bug is with the handling of the clientPort option.
> One line fix to follow shortly.
> thanks!
> Andrew
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira