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

Yasuhito Fukuda commented on ZOOKEEPER-1797:
--------------------------------------------

In addition, You can try earthquake in just one-line command, too: `docker run 
-i -t --rm osrg/earthquake-zookeeper-1797`

{noformat}
# docker run -i -t --rm osrg/earthquake-zookeeper-1797
[INFO] Reproducing ZOOKEEPER-1797 (PurgeTxnLog may delete data logs during roll)
[INFO] Cleaning..
[INFO] Starting earthquake (ca91befb0556bddbf8229ef9b6650ec94cf79471)
[INFO] Starting ZooKeeper  (4d08af6da87eac3b565d599b0d24683e2e734827)
[INFO] Starting createZnode.sh (see /createZnode.log)
[INFO] Restarting ZooKeeper
[INFO] Checking Znodes (see /validateZnode.log)
[INFO] Done
Unexpected exception when visiting znode!: error_count=5
[IMPORTANT] SUCCESS: earthquake reproduced the bug.
[INFO] For more information, please refer to https://github.com/osrg/earthquake 
and 
https://github.com/osrg/zookeeper/blob/zookeeper-1797/earthquake/zookeeper-1797/README.txt
[INFO] Exiting..
[INFO] If you want to drop to shell after the test, please run `docker run -i 
-t osrg/earthquake-zookeeper-1797 /bin/bash`, then run `/init.py` in the 
container.
{noformat}


Regards,
Fukuda

> PurgeTxnLog may delete data logs during roll
> --------------------------------------------
>
>                 Key: ZOOKEEPER-1797
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1797
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.4.5
>            Reporter: Derek Dagit
>            Assignee: Rakesh R
>            Priority: Blocker
>             Fix For: 3.4.7, 3.5.0
>
>         Attachments: ZOOKEEPER-1797.patch, ZOOKEEPER-1797.patch, 
> ZOOKEEPER-1797.patch, ZOOKEEPER-1797.patch
>
>
> org.apache.zookeeper.server.PurgeTxnLog deletes old data logs and snapshots, 
> keeping the newest N snapshots and any data logs that have been written since 
> the snapshot.
> It does this by listing the available snapshots & logs and creates a 
> blacklist of snapshots and logs that should not be deleted.  Then, it 
> searches for and deletes all logs and snapshots that are not in this list.
> It appears that if logs are rolling or a new snapshot is created during this 
> process, then these newer files will be unintentionally deleted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to