Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-1277

Race condition between master and tserver when acquiring tserver lock

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.3
    • 1.4.4, 1.5.0
    • master, tserver
    • None

    Description

      When restarting a stopped tserver, the following happens:
      The tserver (in TabletServer.announceExistence()) creates an entry in zookeeper at /accumulo/instance-id/tserver/host:port.

      This in turn triggers master to execute the call chain:
      LiveTServerSet.process(WatchedEvent)
      LiveTServerSet.scanServers()
      LiveTServerSet.checkServer(Set<TServerInstance>, Set<TServerInstance>, String, String)

      The checkServer() method checks to see if the ZooLock data has been created yet (if tserver loses the race, it has not yet been created) causing master to then delete the tserver node.

      When the tserver attempts to create the ZooLock, the parent path no longer exists and creating the lock fails. Eventually the tserver will time out waiting to create the lock, and fail to start.

      This problem is easier to reproduce in a smallish cluster using a single zookeeper node, where there is more latency between the tserver and zookeeper than there is between the master and zookeeper.

      This behavior was introduced in the fix for ACCUMULO-1049.

      Attachments

        Activity

          People

            kturner Keith Turner
            dptruitt Daniel P Truitt
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: