You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org> on 2009/04/29 10:34:30 UTC

[jira] Created: (ZOOKEEPER-387) closeLedger shouldn't shut down all QuorumEngines

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
         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.


[jira] Assigned: (ZOOKEEPER-387) closeLedger shouldn't shut down all QuorumEngines

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira reassigned ZOOKEEPER-387:
------------------------------------------------

    Assignee: Flavio Paiva Junqueira

> 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.


[jira] Updated: (ZOOKEEPER-387) closeLedger shouldn't shut down all QuorumEngines

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-387:
---------------------------------------------

    Attachment: ZOOKEEPER-387.patch

> 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.


[jira] Resolved: (ZOOKEEPER-387) closeLedger shouldn't shut down all QuorumEngines

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira resolved ZOOKEEPER-387.
----------------------------------------------

    Resolution: Duplicate

We'll solve this issue in ZOOKEEPER-380.

> 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.


[jira] Commented: (ZOOKEEPER-387) closeLedger shouldn't shut down all QuorumEngines

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704316#action_12704316 ] 

Mahadev konar commented on ZOOKEEPER-387:
-----------------------------------------

cancelled the patch since ZOOKEEPER-380 includes the change already.

> 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.


[jira] Commented: (ZOOKEEPER-387) closeLedger shouldn't shut down all QuorumEngines

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704056#action_12704056 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-387:
--------------------------------------------------

QA says that this patch fails core tests. The patch doesn't even modify core ZooKeeper, though. From the output, it looks like the C tests are still failing, and it can't be caused by this patch.


> 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.


[jira] Commented: (ZOOKEEPER-387) closeLedger shouldn't shut down all QuorumEngines

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (ZOOKEEPER-387) closeLedger shouldn't shut down all QuorumEngines

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704054#action_12704054 ] 

Hadoop QA commented on ZOOKEEPER-387:
-------------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12406755/ZOOKEEPER-387.patch
  against trunk revision 769079.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 3 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    -1 core tests.  The patch failed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/56/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/56/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/56/console

This message is automatically generated.

> 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.


[jira] Updated: (ZOOKEEPER-387) closeLedger shouldn't shut down all QuorumEngines

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-387:
------------------------------------

    Status: Open  (was: Patch Available)

> 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.


[jira] Updated: (ZOOKEEPER-387) closeLedger shouldn't shut down all QuorumEngines

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-387:
---------------------------------------------

    Status: Patch Available  (was: Open)

> 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.