[
https://issues.apache.org/jira/browse/ZOOKEEPER-2844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16405987#comment-16405987
]
Tim Krüger edited comment on ZOOKEEPER-2844 at 3/20/18 10:05 AM:
-----------------------------------------------------------------
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}
Log:
{code:java}
2018-03-20T10:00:52,943 INFO [main]
org.apache.zookeeper.server.DatadirCleanupManager: autopurge.snapRetainCount
set to 10
2018-03-20T10:00:52,943 INFO [main]
org.apache.zookeeper.server.DatadirCleanupManager: autopurge.purgeInterval set
to 1
2018-03-20T10:00:52,943 INFO [PurgeTask]
org.apache.zookeeper.server.DatadirCleanupManager: Purge task started.
2018-03-20T10:00:52,943 WARN [main]
org.apache.zookeeper.server.quorum.QuorumPeerMain: Either no config or no
quorum defined in config, running in standalone mode
2018-03-20T10:00:52,943 INFO [PurgeTask]
org.apache.zookeeper.server.DatadirCleanupManager: Purge task completed.{code}
I configured this yesterday. But up today no old snapshots were deleted.
was (Author: timkrueger):
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)