You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by hamsterready <gi...@git.apache.org> on 2018/02/28 00:47:05 UTC

[GitHub] zookeeper pull request #475: Fixed PurgeTxnLog params order in the zkCleanup...

GitHub user hamsterready opened a pull request:

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

    Fixed PurgeTxnLog params order in the zkCleanup.sh

    

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

    $ git pull https://github.com/hamsterready/zookeeper hamsterready-patch-1

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

    https://github.com/apache/zookeeper/pull/475.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 #475
    
----
commit 08a20923cfb19cf5e45cdb5579ab0b858eb954f2
Author: Maciej Lopacinski <ha...@...>
Date:   2018-02-28T00:42:57Z

    Fixed PurgeTxnLog params order in the zkCleanup.sh

----


---

[GitHub] zookeeper issue #475: Fixed PurgeTxnLog params order in the zkCleanup.sh

Posted by anmolnar <gi...@git.apache.org>.
Github user anmolnar commented on the issue:

    https://github.com/apache/zookeeper/pull/475
  
    @hamsterready Thanks for the contribution.
    Would you please kindly create a jira for this?
    I'll take a look at it soon.


---

[GitHub] zookeeper pull request #475: Fixed PurgeTxnLog params order in the zkCleanup...

Posted by hamsterready <gi...@git.apache.org>.
Github user hamsterready closed the pull request at:

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


---

[GitHub] zookeeper issue #475: Fixed PurgeTxnLog params order in the zkCleanup.sh

Posted by hamsterready <gi...@git.apache.org>.
Github user hamsterready commented on the issue:

    https://github.com/apache/zookeeper/pull/475
  
    Hehe... and I was wondering how do you handle github/jira issues ... now got an answer.


---

[GitHub] zookeeper issue #475: Fixed PurgeTxnLog params order in the zkCleanup.sh

Posted by anmolnar <gi...@git.apache.org>.
Github user anmolnar commented on the issue:

    https://github.com/apache/zookeeper/pull/475
  
    I know what the problem is. 3.4.11 has a bug that swaps dataDir and dataLogDir from config file.
    Sorry, it's only mentioned briefly on the release page:
    http://zookeeper.apache.org/releases.html
    > WARNING: ZOOKEEPER-2960 was recently identified as a regression in 3.4.11 ...
    
    Please wait for 3.4.12 for the fix and in the meantime you can probably workaround it with your fix, but it should not be merged in the codebase.


---

[GitHub] zookeeper issue #475: Fixed PurgeTxnLog params order in the zkCleanup.sh

Posted by hamsterready <gi...@git.apache.org>.
Github user hamsterready commented on the issue:

    https://github.com/apache/zookeeper/pull/475
  
    See report here: https://github.com/31z4/zookeeper-docker/issues/30
    
    Original version:
    
    ```
    bash-4.4# ./bin/zkCleanup.sh
    Usage:
    PurgeTxnLog dataLogDir [snapDir] -n count
            dataLogDir -- path to the txn log directory
            snapDir -- path to the snapshot directory
            count -- the number of old snaps/logs you want to keep, value should be greater than or equal to 3
    bash-4.4# ./bin/zkCleanup.sh  -n 4
    bash-4.4# echo $?
    0
    bash-4.4#
    ```
    
    And here is after the change:
    ```
    bash-4.4# vi bin/zkCleanup.sh
    bash-4.4# ./bin/zkCleanup.sh  -n 4
    2018-03-01 14:51:42,420 [myid:] - INFO  [main:PurgeTxnLog@156] - Removing file: Mar 1, 2018 2:08:30 PM  /data/version-2/log.203c92a69
    Removing file: Mar 1, 2018 2:08:30 PM   /data/version-2/log.203c92a69
    2018-03-01 14:51:42,448 [myid:] - INFO  [main:PurgeTxnLog@156] - Removing file: Mar 1, 2018 2:19:10 PM  /data/version-2/log.203cce100
    Removing file: Mar 1, 2018 2:19:10 PM   /data/version-2/log.203cce100
    [.. cut for clarity...]
    Removing file: Mar 1, 2018 2:19:11 PM   /datalog/version-2/snapshot.203ce21e8
    2018-03-01 14:51:42,910 [myid:] - INFO  [main:PurgeTxnLog@156] - Removing file: Mar 1, 2018 2:22:10 PM  /datalog/version-2/snapshot.203cf2928
    Removing file: Mar 1, 2018 2:22:10 PM   /datalog/version-2/snapshot.203cf2928
    
    ```


---

[GitHub] zookeeper issue #475: Fixed PurgeTxnLog params order in the zkCleanup.sh

Posted by hamsterready <gi...@git.apache.org>.
Github user hamsterready commented on the issue:

    https://github.com/apache/zookeeper/pull/475
  
    https://issues.apache.org/jira/browse/ZOOKEEPER-2987


---

[GitHub] zookeeper issue #475: Fixed PurgeTxnLog params order in the zkCleanup.sh

Posted by hamsterready <gi...@git.apache.org>.
Github user hamsterready commented on the issue:

    https://github.com/apache/zookeeper/pull/475
  
    Makes sense. Thank you for this.


---

[GitHub] zookeeper issue #475: Fixed PurgeTxnLog params order in the zkCleanup.sh

Posted by anmolnar <gi...@git.apache.org>.
Github user anmolnar commented on the issue:

    https://github.com/apache/zookeeper/pull/475
  
    How does your ZooKeeper config file look like?


---

[GitHub] zookeeper issue #475: Fixed PurgeTxnLog params order in the zkCleanup.sh

Posted by anmolnar <gi...@git.apache.org>.
Github user anmolnar commented on the issue:

    https://github.com/apache/zookeeper/pull/475
  
    I had a look at the code and it seems to me that previous ordering of parameters was right. 
    
    `FileTxnSnapLog` class is instantiated from `PurgeTxnLog` by parsing the 0. cli arg to `dataDir` (== txn log dir) and 1. cli arg to `snapDir` (==snapshot dir). 
    
    So, basically the right order of cli args is _logdir_ and _snapdir_.
    
    Would you please clarify what have you experienced exactly when you said _without that it did nothing_?


---

[GitHub] zookeeper issue #475: Fixed PurgeTxnLog params order in the zkCleanup.sh

Posted by hamsterready <gi...@git.apache.org>.
Github user hamsterready commented on the issue:

    https://github.com/apache/zookeeper/pull/475
  
    Closing this one. Thank you for letting me know. Cheers


---