Bookkeeper
  1. Bookkeeper
  2. BOOKKEEPER-245

Intermittent failures in PersistanceManager tests

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.0
    • Component/s: None
    • Labels:
      None

      Description

      TestLocalDBPersistenceManagerBlackBox sometimes fails[1]. As does TestBookKeeperPersistenceManagerWhiteBox[2].

      [1] https://builds.apache.org/job/bookkeeper-trunk/481/
      [2] https://builds.apache.org/job/bookkeeper-trunk/498/

        Activity

        Hide
        Hudson added a comment -

        Integrated in bookkeeper-trunk #502 (See https://builds.apache.org/job/bookkeeper-trunk/502/)
        BOOKKEEPER-245: Intermittent failures in PersistanceManager tests (ivank) (Revision 1336569)

        Result = ABORTED
        ivank :
        Files :

        • /zookeeper/bookkeeper/trunk/CHANGES.txt
        • /zookeeper/bookkeeper/trunk/hedwig-server/pom.xml
        • /zookeeper/bookkeeper/trunk/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookkeeperPersistenceManagerWhiteBox.java
        Show
        Hudson added a comment - Integrated in bookkeeper-trunk #502 (See https://builds.apache.org/job/bookkeeper-trunk/502/ ) BOOKKEEPER-245 : Intermittent failures in PersistanceManager tests (ivank) (Revision 1336569) Result = ABORTED ivank : Files : /zookeeper/bookkeeper/trunk/CHANGES.txt /zookeeper/bookkeeper/trunk/hedwig-server/pom.xml /zookeeper/bookkeeper/trunk/hedwig-server/src/test/java/org/apache/hedwig/server/persistence/TestBookkeeperPersistenceManagerWhiteBox.java
        Hide
        Ivan Kelly added a comment -

        Committing as r1336569. Thanks for reviewing Sijie.

        Show
        Ivan Kelly added a comment - Committing as r1336569. Thanks for reviewing Sijie.
        Hide
        Sijie Guo added a comment -

        yes, ur right. I did find this issue and fix it in BOOKKEEPER-191.

        It would be better to fix it in separated issue. thanks Ivan. the patch looks good to me. +1

        Show
        Sijie Guo added a comment - yes, ur right. I did find this issue and fix it in BOOKKEEPER-191 . It would be better to fix it in separated issue. thanks Ivan. the patch looks good to me. +1
        Hide
        Ivan Kelly added a comment -

        The patch fixes as stated in previous comment, and also fixes it so that if the white box bug manifests, it shows as a proper exception, and not a NPE.

        Show
        Ivan Kelly added a comment - The patch fixes as stated in previous comment, and also fixes it so that if the white box bug manifests, it shows as a proper exception, and not a NPE.
        Hide
        Ivan Kelly added a comment -

        TestLocalDBPersistenceManagerBlackBox failure is caused by DERBY-2074. Bumping the derby dependency fixes it.

        TestBookKeeperPersistenceManagerWhiteBox fails because the PM thinks that it doesn't own the topic. This is because we randomly clear the topic list so that we will use multiple ledgers. If we do this on the last iteration of the outer loop, when we try to scan it will think that we don't own the topic. The solution is to acquire the topic before to scan to ensure that we have it.

        // once in every 10 times, give up ledger
        if (r.nextInt(10) == 9) {
            // Make the bkpm lose its memory
            bkpm.topicInfos.clear();
            numPrevLedgers++;
        }
        
        Show
        Ivan Kelly added a comment - TestLocalDBPersistenceManagerBlackBox failure is caused by DERBY-2074 . Bumping the derby dependency fixes it. TestBookKeeperPersistenceManagerWhiteBox fails because the PM thinks that it doesn't own the topic. This is because we randomly clear the topic list so that we will use multiple ledgers. If we do this on the last iteration of the outer loop, when we try to scan it will think that we don't own the topic. The solution is to acquire the topic before to scan to ensure that we have it. // once in every 10 times, give up ledger if (r.nextInt(10) == 9) { // Make the bkpm lose its memory bkpm.topicInfos.clear(); numPrevLedgers++; }

          People

          • Assignee:
            Ivan Kelly
            Reporter:
            Ivan Kelly
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development