Uploaded image for project: 'Bookkeeper'
  1. Bookkeeper
  2. BOOKKEEPER-63

Hedwig PubSubServer must wait for its Zookeeper client to be connected upon startup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.0.0
    • hedwig-server
    • None

    Description

      When a PubSubServer is instantiated in non-standalone mode, it creates a ZkTopicManager which takes a Zookeeper client as an argument.
      Unfortunately, this Zookeeper client may not be connected yet (not in CONNECTED state yet), and when this is the case, creation of ZkTopicManager fails, leading to failure of the PubSubServer startup.

      Typical error (adapted, line numbers take into account commented patching code):
      jjava.io.IOException: org.apache.hedwig.exceptions.PubSubException$ServiceDownException: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hedwig/standalone/hosts/x.x.x.x:4080:9876
      at org.apache.hedwig.server.netty.PubSubServer.instantiateTopicManager(PubSubServer.java:170)
      at org.apache.hedwig.server.netty.PubSubServer$3.run(PubSubServer.java:294)
      at java.lang.Thread.run(Thread.java:680)
      Caused by: org.apache.hedwig.exceptions.PubSubException$ServiceDownException: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hedwig/standalone/hosts/x.x.x.x:4080:9876
      at org.apache.hedwig.server.topics.ZkTopicManager$4.safeProcessResult(ZkTopicManager.java:146)
      etc...

      This is particularly problematic for running tests that require to pass a config to the PubSubServer.

      Attachments

        1. patch-v2.txt
          3 kB
          Matthieu Morel
        2. patch-testcase.txt
          4 kB
          Matthieu Morel
        3. patch.txt
          3 kB
          Matthieu Morel
        4. BOOKKEEPER-63.patch
          8 kB
          Matthieu Morel
        5. BOOKKEEPER-63.patch
          8 kB
          Matthieu Morel
        6. BOOKKEEPER-63.patch
          8 kB
          Matthieu Morel

        Activity

          People

            ikelly Ivan Kelly
            mmorel Matthieu Morel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: