apache/druid · info

Someone deleted path

Error message

Someone deleted path[%s] while we were trying to set it. Leaving it deleted.

What it means

CuratorUtils.createOrSet creates a znode or sets its data in ZooKeeper. If the node was created by this call's guards but deleted by another actor between existence check and setData(), ZooKeeper throws KeeperException.NoNodeException. The utility treats this as an acceptable race, logs it, and leaves the node deleted rather than recreating it, avoiding resurrection of intentionally deleted nodes.

Solutions

  1. No action needed if rare — this is a benign concurrent-deletion race and the node is intentionally left deleted.
  2. If frequent, check for duplicate/conflicting actors writing the same znode (multiple leaders, overlapping tasks).
  3. Verify no external scripts or humans are deleting Druid znodes in ZooKeeper.
  4. Ensure the writer retries with createOrSet at a higher level if the value must persist.
Defensive patterns

Strategy: retry

Validate before calling

if (curatorFramework.checkExists().forPath(path) == null) { createOrSet(path, bytes); } else { createOrSet(path, bytes); }

Try / catch

try { curator.setData().forPath(path, bytes); } catch (KeeperException.NoNodeException e) { log.warn("Path deleted concurrently; leaving deleted"); }

Prevention

When it happens

Trigger: createOrSet(path, bytes) is called; creation path check finds the node exists so it calls setData().forPath, but another client (e.g. a concurrent segment delete or server shutdown) deletes the node first, surfacing NoNodeException.

Common situations: Concurrent segment drop while coordinator/overlord updates segment metadata znodes; server ephemeral nodes disappearing as a historical disconnects; multiple coordinators in leader conflict racing on the same znode; clients manually deleting znodes under /druid while services run.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/026b5f0b90800945. Report an issue: GitHub.

Appendix: source

Thrown at server/src/main/java/org/apache/druid/curator/CuratorUtils.java:115

        curatorFramework.create()
                        .creatingParentsIfNeeded()
                        .withMode(mode)
                        .forPath(path, rawBytes);

        created = true;
      }
      catch (KeeperException.NodeExistsException e) {
        log.debug("Path [%s] created while we were running, will setData instead.", path);
      }
    }

    if (!created) {
      try {
        curatorFramework.setData()
                        .forPath(path, rawBytes);
      }
      catch (KeeperException.NoNodeException e) {
        log.warn("Someone deleted path[%s] while we were trying to set it. Leaving it deleted.", path);
      }
    }
  }

  private static void verifySize(String path, byte[] rawBytes, int maxZnodeBytes)
  {
    if (rawBytes.length > maxZnodeBytes) {
      throw new IAE(
          "Length of raw bytes for znode[%s] too large[%,d > %,d]",
          path,
          rawBytes.length,
          maxZnodeBytes
      );
    }
  }

  public static boolean isChildAdded(PathChildrenCacheEvent event)
  {

View on GitHub (pinned to 9b90983fd2)