You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Tim Krüger (JIRA)" <ji...@apache.org> on 2018/03/20 09:15:00 UTC

[jira] [Commented] (ZOOKEEPER-2844) Zookeeper auto purge process does not purge files

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

Tim Krüger commented on ZOOKEEPER-2844:
---------------------------------------

Same problem here at Windows Server 2012R2

 

This is my {{zoo.cfg}}:
{code:java}
tickTime=2000
initLimit=10
syncLimit=5
dataDir=E:/my-app/application-data/data/zookeeper
clientPort=2181

autopurge.snapRetainCount=10
autopurge.purgeInterval=1{code}
 

I configured this yesterday. But up today no old snapshots were deleted.

> Zookeeper auto purge process does not purge files
> -------------------------------------------------
>
>                 Key: ZOOKEEPER-2844
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2844
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.4.6
>         Environment: Windows Server 2008 R2
>            Reporter: Avi Steiner
>            Priority: Major
>         Attachments: ZK.zip
>
>
> I'm using Zookeeper 3.4.6
>     
> The ZK log data folder keeps growing with transaction logs files (log.*).
>     
> I set the following in zoo.cfg:
> autopurge.purgeInterval=1
> autopurge.snapRetainCount=3
> dataDir=..\\data
>     
> Per ZK log, it reads those parameters:
>     
> 2017-07-13 10:36:21,266 [myid:] - INFO  [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
> 2017-07-13 10:36:21,266 [myid:] - INFO  [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 1
>     
> It also says that cleanup process is running:
>     
> 2017-07-13 10:36:21,266 [myid:] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
> 2017-07-13 10:36:21,297 [myid:] - INFO  [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
>     
> But actually nothing is deleted.
> Every service restart, a new file is created.
>     
> The only parameter I managed to change is preAllocSize, which means the minimum size per file. The default is 64MB. I changed it to 10KB only for testing, and I swa the effect as expected: new files were created with 10KB.
> I also tried to create a batch file that will run the following:
> java -cp zookeeper-3.4.6.jar;lib/slf4j-api-1.6.1.jar;lib/slf4j-log4j12-1.6.1.jar;lib/log4j-1.2.16.jar;conf org.apache.zookeeper.server.PurgeTxnLog .\data -n 3
> But it still doesn't do the job.
> Please advise.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)