Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1733

FLETest#testLE is flaky on windows boxes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.4.5
    • 3.4.6, 3.5.0
    • None
    • None
    • Reviewed

    Description

      FLETest#testLE fail intermittently on windows boxes. The reason is that in LEThread#run() we have:

                                      if(leader == i){
                                          synchronized(finalObj){
                                              successCount++;
                                              if(successCount > (count/2)) finalObj.notify();
                                          }
      
                                          break;
                                      }
      

      Basically once we have a confirmed leader, the leader thread dies due to the "break" of while loop.

      While in the verification step, we check if the leader thread alive or not as following:

             if(threads.get((int) leader).isAlive()){
                 Assert.fail("Leader hasn't joined: " + leader);
             }
      

      On windows boxes, the above verification step fails frequently because leader thread most likely already exits.

      Do we know why we have the leader alive verification step only lead thread can bump up successCount >= count/2?

      Attachments

        1. ZOOKEEPER-1733-3.4.patch
          2 kB
          Michi Mutsuzaki
        2. zookeeper-1733.patch
          3 kB
          Patrick D. Hunt
        3. zookeeper-1733.patch
          3 kB
          Jeffrey Zhong

        Issue Links

          Activity

            People

              jeffreyz Jeffrey Zhong
              jeffreyz Jeffrey Zhong
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: