zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anmolnar <...@git.apache.org>
Subject [GitHub] zookeeper pull request #508: ZOOKEEPER-2994 Tool required to recover log and...
Date Tue, 24 Apr 2018 14:33:53 GMT
GitHub user anmolnar opened a pull request:


    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:


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 <andor@...>
Date:   2018-04-23T22:20:26Z

    ZOOKEEPER-2994: Tool required to recover log and snapshot entries with CRC errors
    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
    Author: Andor Molnar <andor@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



View raw message