You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by anmolnar <gi...@git.apache.org> on 2018/04/24 14:33:53 UTC

[GitHub] zookeeper pull request #508: ZOOKEEPER-2994 Tool required to recover log and...

GitHub user anmolnar opened a pull request:

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

    ZOOKEEPER-2994 Tool required to recover log and snapshot entries with CRC errors (3.4)

    This is the 3.4 version of https://github.com/apache/zookeeper/pull/487
    @phunt I've just realized that the patch must introduce a new dependency: commons-cli.
    Not sure if you're willing to merge it in this case.

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

    $ git pull https://github.com/anmolnar/zookeeper ZOOKEEPER-2994_34

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

    https://github.com/apache/zookeeper/pull/508.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 #508
    
----
commit 3bc2e5f7257ae23ccce1ff72a83510322efe716e
Author: Andor Molnar <an...@...>
Date:   2018-04-23T22:20:26Z

    ZOOKEEPER-2994: Tool required to recover log and snapshot entries with CRC errors
    
    https://issues.apache.org/jira/browse/ZOOKEEPER-2994
    
    In the event  of ZooKeeper transaction log becomes corrupted and fail CRC checks (preventing startup) we should have a mechanism to get the cluster running again.
    
    Previously we achieved this by loading the broken transaction log with a modified version of ZK with disabled CRC check and forced it to write new txn log files.
    
    It has proven that once you end up with the corrupt txn log there is no way to recover except manually modifying the crc check. That's basically why the tool is needed.
    
    It's called TxnLogToolkit, a new console application similar to LogFormatter and SnapshotFormatter, but it's intentionally separated to keep backward compatibility in the existing tools.
    
    This PR contains TXN log tool only.
    
    You probably also notice a refactoring to extract file padding logic from FileTxnLog to reuse in the new tool. Related code changes can be reviewed alone in a separate commit if preferred.
    
    Author: Andor Molnar <an...@cloudera.com>
    
    Reviewers: phunt@apache.org
    
    Closes #487 from anmolnar/ZOOKEEPER-2994 and squashes the following commits:
    
    221760ccc [Andor Molnar] ZOOKEEPER-2994. Added documentation and startup scripts
    a69d7297b [Andor Molnar] ZOOKEEPER-2994. Fix findbugs warning
    0b95efefd [Andor Molnar] ZOOKEEPER-2994. Fix for unit test
    15fa45c68 [Andor Molnar] ZOOKEEPER-2994. Added padding, tool renamed to TxnLogToolkit, interactive mode, etc.
    6a1ad0ec4 [Andor Molnar] ZOOKEEPER-2994. Refactor FileTxnLog's padding logic to separate class for reusability
    0d089ccdd [Andor Molnar] ZOOKEEPER-2994. Added new tool TxnLogTool for txn log file recovery
    
    Change-Id: I7560362633a7bc919ae6d3ca7e3588e196a1919c

----


---

[GitHub] zookeeper issue #508: ZOOKEEPER-2994 Tool required to recover log and snapsh...

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

    https://github.com/apache/zookeeper/pull/508
  
    +1. Great. Thanks @anmolnar . I've committed for 3.4.13.


---

[GitHub] zookeeper issue #508: ZOOKEEPER-2994 Tool required to recover log and snapsh...

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

    https://github.com/apache/zookeeper/pull/508
  
    tbh would rather not. Given it's available here as a patch for anyone that needs it why don't we just include it in 3.5+ . Anyone that wants it can apply themselves and use it using what you've provided here.
    
    Make sense @anmolnar ? If so close this. Otw lmk.


---

[GitHub] zookeeper issue #508: ZOOKEEPER-2994 Tool required to recover log and snapsh...

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

    https://github.com/apache/zookeeper/pull/508
  
    @phunt Done. Now it's using a custom parser and no additional dependency requirement.


---

[GitHub] zookeeper issue #508: ZOOKEEPER-2994 Tool required to recover log and snapsh...

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

    https://github.com/apache/zookeeper/pull/508
  
    @anmolnar you will have to close this manually as it's not master branch.



---

[GitHub] zookeeper pull request #508: ZOOKEEPER-2994 Tool required to recover log and...

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

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


---

[GitHub] zookeeper issue #508: ZOOKEEPER-2994 Tool required to recover log and snapsh...

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

    https://github.com/apache/zookeeper/pull/508
  
    I will rather remove the dependency and change the implementation to behave similarly without it, so that we can merge this safely.


---