You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/03/10 16:55:00 UTC

[jira] [Commented] (ZOOKEEPER-2994) Tool required to recover log and snapshot entries with CRC errors

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

ASF GitHub Bot commented on ZOOKEEPER-2994:
-------------------------------------------

GitHub user anmolnar opened a pull request:

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

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

    In the even that the zookeeper transaction log become 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 snapshot.
    
    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 can merge this pull request into a Git repository by running:

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

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

    https://github.com/apache/zookeeper/pull/487.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 #487
    
----
commit 2936846d3b778fd9410910ec16659079a715e96b
Author: Andor Molnar <an...@...>
Date:   2018-03-07T15:33:23Z

    ZOOKEEPER-2994. Added new tool TxnLogTool for txn log file recovery

commit 240fdb6f4841c66d76378b296a27ef3c373d2e9c
Author: Andor Molnar <an...@...>
Date:   2018-03-09T13:55:03Z

    ZOOKEEPER-2994. Refactor FileTxnLog's padding logic to separate class for reusability

commit b6fe47da610cba46ba52b3870c3a72b9b63ea895
Author: Andor Molnar <an...@...>
Date:   2018-03-10T10:55:28Z

    ZOOKEEPER-2994. Added padding, tool renamed to TxnLogToolkit,
    interactive mode, etc.

----


> Tool required to recover log and snapshot entries with CRC errors
> -----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2994
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2994
>             Project: ZooKeeper
>          Issue Type: New Feature
>            Reporter: Andor Molnar
>            Assignee: Andor Molnar
>            Priority: Major
>             Fix For: 3.5.4, 3.6.0
>
>
> In the even that the zookeeper transaction log or snapshot become 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 snapshot.
> It'd very handy to have a tool which can do this for us. LogFormatter and SnapshotFormatter have already been designed to dump log and snapshot files, it'd be nice to extend their functionality and add ability for such recovery.
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)