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

Bruno Freudensprung commented on ZOOKEEPER-1835:
------------------------------------------------

First I'd like to say I'm sorry for previous alarming test results.
After encouraging test results on the Windows 8 box, I finally realized that, 
besides the OS, the other difference was the Java version: Oracle Java 1.6 x64 
on my Windows 8 box, and Oracle Java 1.7 x64 on my Windows 7 box.
I switched to Oracle Java 1.6 x64 on my Windows 7 box as well and... much 
better!

Windows 8 trunk-only:
     Test org.apache.zookeeper.server.util.DynamicConfigBCTest FAILED
     Test org.apache.zookeeper.test.ClientPortBindTest FAILED
     Test org.apache.zookeeper.test.QuorumTest FAILED
     Test org.apache.zookeeper.test.StaticHostProviderTest FAILED (timeout)

Windows 8 trunk+patch:
     Test org.apache.zookeeper.server.quorum.ReconfigRecoveryTest FAILED
     Test org.apache.zookeeper.test.ClientPortBindTest FAILED
     Test org.apache.zookeeper.test.QuorumTest FAILED
     Test org.apache.zookeeper.test.StaticHostProviderTest FAILED (timeout)

Windows 7 trunk-only:
     Test org.apache.zookeeper.server.quorum.ReconfigRecoveryTest FAILED
     Test org.apache.zookeeper.server.util.DynamicConfigBCTest FAILED
     Test org.apache.zookeeper.test.ClientPortBindTest FAILED
     Test org.apache.zookeeper.test.QuorumTest FAILED
     Test org.apache.zookeeper.test.StaticHostProviderTest FAILED (timeout)

Windows 7 trunk+patch:
     Test org.apache.zookeeper.server.quorum.ReconfigRecoveryTest FAILED
     Test org.apache.zookeeper.test.ClientPortBindTest FAILED
     Test org.apache.zookeeper.test.QuorumTest FAILED
     Test org.apache.zookeeper.test.StaticHostProviderTest FAILED (timeout)

Quite honestly, I don't know what to conclude; on Windows test results seem to 
be so unpredictable.
The invariant seems to be that 
org.apache.zookeeper.server.util.DynamicConfigBCTest failure neved showed up 
with the patch.
Maybe I'll try to loop on ReconfigRecoveryTest and DynamicConfigBCTest tests to 
see if there is a statistical "evidence".



> dynamic configuration file renaming fails on Windows
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-1835
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1835
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: quorum
>    Affects Versions: 3.5.0
>         Environment: Windows 7 64-bit, Oracle Java  1.6.0_32-b05
>            Reporter: Bruno Freudensprung
>            Assignee: Bruno Freudensprung
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1835.patch, ZOOKEEPER-1835.patch, 
> ZOOKEEPER-1835.patch, ZOOKEEPER-1835.patch
>
>
> On Windows, reconfig fails to rename the tmp dynamic config file to the real 
> dynamic config filename.
> Javadoc of java.io.File.renameTo says the behavior is highly plateform 
> dependent, so I guess this should not be a big surprise.
> The problem occurs in 
> src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java that 
> could be modified like this:
> + curFile.delete();
> if (!tmpFile.renameTo(curFile)) {
> + configFile.delete();
> if (!tmpFile.renameTo(configFile)) {
> As suggested by Alex in https://issues.apache.org/jira/browse/ZOOKEEPER-1691 
> (btw there is more information about my test scenario over there) it is a bit 
> "scary" to delete the current configuration file.



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

Reply via email to