Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-320

Discovery reregister triggered even if retry policy suceeds. Connection looping condition.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • TBD, 2.10.0
    • TBD
    • Client, Framework
    • None
    • 3 server Quorum running on individual AWS boxes.
      Session timeout set to 1-2 min on most clients.

    Description

      ServiceDiscoveryImpl.reRegisterServices() can be trigger on ConnectionState events: RECONNECTED and CONNECTED. Causing the reRegisterServices() method to be run on ConnectionStateManager thread. If a connection drops while running reRegisterServices() it will be recovered by the retry policy. However the ConnectionState SUSPENDED followed by RECONNECTED events will be queued but not fired until reRegisterServices() completes(ConnectionStateManager Thread fires these events but is in use). When it does complete the RECONNECTED event in the queue will fire and reRegisterServices() will rerun.
      When zookeeper's server connection is interrupted all of the clients will simultaneously call reRegisterServices(). This overloads the server with requests causing connections to timeout and reset. Thus queuing up more RECONNECTED events. This state can persist indefinitely.
      Because the reRegisterServices() will most likely receive a NodeExistsException. It deletes and recreates the node. Effectively causing the services to thrash up and down. Wreaking havoc on our service dependency chain.

      Attachments

        Activity

          People

            Unassigned Unassigned
            runningfly Running Fly
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: