You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Ivan Kelly (JIRA)" <ji...@apache.org> on 2012/05/09 17:49:48 UTC

[jira] [Commented] (BOOKKEEPER-244) BookKeeperJournalManager: NN startup is failing, when tries to recoverUnfinalizedSegments() a bad inProgress_ ZNodes

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

Ivan Kelly commented on BOOKKEEPER-244:
---------------------------------------

Have you seen this occur in your testing?

There is only a single read of the zookeeper data, in the same way there is only a single write(in EditLogLedgerMetadata#create). I make the assumption that a ZooKeeper#getData(),#create or #setData is atomic.
                
> BookKeeperJournalManager: NN startup is failing, when tries to recoverUnfinalizedSegments() a bad inProgress_ ZNodes
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: BOOKKEEPER-244
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-244
>             Project: Bookkeeper
>          Issue Type: Bug
>            Reporter: Rakesh R
>
> Say, the InProgress_000X node is corrupted due to not writing the data(version, ledgerId, firstTxId) to this inProgress_000X znode. Namenode startup has the logic to recover all the unfinalized segments, here will try to read the segment and getting shutdown.
> {noformat}
> EditLogLedgerMetadata.java:
> static EditLogLedgerMetadata read(ZooKeeper zkc, String path)
>       throws IOException, KeeperException.NoNodeException  {
>       byte[] data = zkc.getData(path, false, null);
>       String[] parts = new String(data).split(";");
>       if (parts.length == 3)
>          ....reading inprogress metadata
>       else if (parts.length == 4)
>          ....reading inprogress metadata
>       else
>         throw new IOException("Invalid ledger entry, "
>                               + new String(data));
>       }
> {noformat}
> Scenario:- Leaving bad inProgress_000X node ?
> Assume BKJM has created the inProgress_000X zNode and ZK is not available when trying to add the metadata. Now, inProgress_000X ends up with partial information.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira