You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Rakesh R (JIRA)" <ji...@apache.org> on 2013/12/17 10:25:07 UTC

[jira] [Commented] (ZOOKEEPER-1844) TruncateTest fails on windows

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

Rakesh R commented on ZOOKEEPER-1844:
-------------------------------------

I think I found the problem, please see the analysis. In this case, snapshotting has happened and created new log file. But the rolledover log file is kept open, this is causing the test case failure.

FileTxnLog.java
{code}
    public synchronized void rollLog() throws IOException {
        if (logStream != null) {
            this.logStream.flush();
            this.logStream = null;
            oa = null;
        }
    }
    public synchronized void close() throws IOException {
        if (logStream != null) {
            logStream.close();
        }
{code}

Following logs shows the rollover and snapshot operations:
{code}
2013-12-16 21:26:02,311 [myid:] - INFO  [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:11223:FileTxnSnapLog@297] - Snapshotting: 0x10000000d to f:\hudson\hudson-slave\workspace\ZooKeeper-trunk-WinVS2008_java\trunk\build\test\tmp\test174937948216250871.junit.dir\version-2\snapshot.10000000d

2013-12-16 21:26:03,415 [myid:] - INFO  [SyncThread:1:FileTxnLog@200] - Creating new log file: log.10000000e
{code}

> TruncateTest fails on windows
> -----------------------------
>
>                 Key: ZOOKEEPER-1844
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1844
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.5.0
>         Environment: windows
>            Reporter: Michi Mutsuzaki
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1844.patch
>
>
> TruncateTest has been failing consistently on windows:
> https://builds.apache.org/job/ZooKeeper-trunk-WinVS2008_java/627/testReport/junit/org.apache.zookeeper.test/TruncateTest/testTruncate/



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)