GitHub user wesc opened a pull request:

    https://github.com/apache/zookeeper/pull/32

    Correctly purge log and snapshot files in different directories.

    PurgeTxnLog is supposed to take two (dataLogDir numSnaps) or three 
(dataLogDir snapDir numSnaps) arguments and deletes files leaving numSnaps in 
place. Unfortunately, it does this correctly only in the case that there are 
three arguments and `dataLogDir == snapDir`.
    
    It currently has a few issues:
    
    1. The `args.length` check requires either 3 or 4 arguments, but it should 
actually take 2 or 3.
    2. The check for `args.length==4` effectively means that `snapDir` can 
never point to a different directory than `dataLogDir`.
    
    This pull request fixes these issues, and also restructures the logic to be 
more explicit about the two cases.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/chartbeat-labs/zookeeper branch-3.4

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/32.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #32
    
----
commit cdfd4d2c2308d81e8af039d9bb7aac534febe39b
Author: Wes Chow <[email protected]>
Date:   2015-06-04T19:00:06Z

    Correctly purge log and snapshot files in different directories.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to