ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-500

Async methods shouldnt throw exceptions

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.0
    • Component/s: contrib-bookkeeper
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Async methods like asyncLedgerCreate and Open shouldnt be throwing InterruptedException and BKExceptions.

      The present method signatures lead to messy application code since one is forced to have error handling code in 2 places: inside the callback to handler a non-OK return code, and outside for handling the exceptions thrown by the call.

      There should be only one way to indicate error conditions, and that should be through a non-ok return code to the callback.

      1. ZOOKEEPER-500.patch
        4 kB
        Flavio Junqueira

        Activity

        Hide
        Flavio Junqueira added a comment -

        This patch resolves this issue. Since this is an improvement, I don't see the need for a test.

        Show
        Flavio Junqueira added a comment - This patch resolves this issue. Since this is an improvement, I don't see the need for a test.
        Hide
        Hadoop QA added a comment -

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

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

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +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 appears to introduce 9 new Findbugs (version 1.3.9) warnings.

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

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

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

        Test results: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/71//testReport/
        Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/71//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/71//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12466533/ZOOKEEPER-500.patch against trunk revision 1049401. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +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 appears to introduce 9 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/71//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/71//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/71//console This message is automatically generated.
        Hide
        Flavio Junqueira added a comment -

        I don't see any findbugs warning related to this patch; I also said already that I think it doesn't require a test.

        Show
        Flavio Junqueira added a comment - I don't see any findbugs warning related to this patch; I also said already that I think it doesn't require a test.
        Hide
        Benjamin Reed added a comment -

        +1 looks good

        Show
        Benjamin Reed added a comment - +1 looks good
        Hide
        Benjamin Reed added a comment -

        Committed revision 1055924.

        Show
        Benjamin Reed added a comment - Committed revision 1055924.
        Hide
        Hudson added a comment -

        Integrated in ZooKeeper-trunk #1060 (See https://hudson.apache.org/hudson/job/ZooKeeper-trunk/1060/)
        ZOOKEEPER-500. Async methods shouldnt throw exceptions

        Show
        Hudson added a comment - Integrated in ZooKeeper-trunk #1060 (See https://hudson.apache.org/hudson/job/ZooKeeper-trunk/1060/ ) ZOOKEEPER-500 . Async methods shouldnt throw exceptions

          People

          • Assignee:
            Flavio Junqueira
            Reporter:
            Utkarsh Srivastava
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development