code: static void releaseTicket(ZooKeeper zookeeper, String lockNode, String ticket)
              throws KeeperException, InterruptedException {
  
          logger.debug("Releasing ticket {}.", ticket);
          try {
              zookeeper.delete(lockNode + "/" + ticket, -1);
          } catch (KeeperException e) {
              if (e.code() != KeeperException.Code.NONODE) {
                  // If it the node is already gone, than that is fine, otherwise:
                  throw e;
              }
          }
      }
docs: Release an acquired lock.
  
  @param zookeeper ZooKeeper connection to use.
  @param lockNode Path to the znode representing the locking queue.
  @param ticket Name of the first node in the queue.