zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mahadev konar (JIRA)" <j...@apache.org>
Subject [jira] Commented: (ZOOKEEPER-387) closeLedger shouldn't shut down all QuorumEngines
Date Wed, 29 Apr 2009 17:38:30 GMT

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

Mahadev konar commented on ZOOKEEPER-387:

I have already fixed this in ZOOKEEPER-380. WOuld you be able to aadd  the test to ZOOKEEPER-380?
You will have the apply the patch and then change your test so that it uses the new api. 

Also, the c tests has some problems. I am working on it.

> closeLedger shouldn't shut down all QuorumEngines
> -------------------------------------------------
>                 Key: ZOOKEEPER-387
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-387
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: contrib-bookkeeper
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>         Attachments: ZOOKEEPER-387.patch
> We had initially assumed one ledger open at a time, and LedgerRecoverMonitor reads and
closes a ledger without instantiating a QuorumEngine. Consequently, when closing a ledger,
we have to shut down a QuorumEngine only if there is one. A poor way of implementing it is
by having a for loop that iterates over all available QuorumEngines and shut them down. Given
the assumptions of one ledger at a time and no QuorumEngine for LedgerRecoveryMonitor, this
implementation works. However, as we move to a more flexible model in which multiple ledgers
can be open and closed at arbitrary times, the for loop choice no longer works. 
> The attached patch fixes this problem by just shutting down the QuorumEngine instance
corresponding to the ledger being closed, and it checks if a QuorumEngine exists before submitting
a STOP operation. The patch also includes a test that opens four ledger, and then sequentially
writes to the each ledger and closes it.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message