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

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

This week-end I looped on DynamicConfigBCTest, ReconfigRecoveryTest and FLETest 
(tests failures not observed on Linux). Tests are done using a shell script 
performing a loop of "ant test -Dtestcase=...".

DynamicConfigBCTest (more than 6500 loops each): 
-  trunk: 100% failures (0 success)
-  patch: 0% failures (0 failure)

ReconfigRecoveryTest (more than 200 loops each): 
-  trunk: 99% failures
-  patch: 94% failures

FLETest (more than 500 loops each): 
-  trunk: 20% failures
-  patch: 2% failures

ReconfigRecoveryTest and FLETest do exhibit a random behavior on my Windows 7 
box.


> 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