apache/druid · info

Requested delete lookup

Error message

Requested delete lookup [%s]/[%s]. But no lookups exist!

What it means

LookupCoordinatorManager.deleteLookup() logs this warning and returns false when there is no lookup configuration at all (getKnownLookups() == null), so neither the tier nor the lookup can exist. It is a guarded no-op rather than a thrown error.

Solutions

  1. Confirm existing lookup config: GET /druid/coordinator/v1/lookups/config.
  2. Treat false as idempotent success if the lookup should not exist anyway.
  3. If lookups were expected, check the lookup config manager's connectivity to its storage and node announcements.
  4. Adjust client code to check the boolean return instead of expecting an exception.

Example fix

// before
if (!manager.deleteLookup("__default", "country")) { throw new IllegalStateException("delete failed"); }
// after
if (!manager.deleteLookup("__default", "country") && manager.getKnownLookups() != null) { throw new IllegalStateException("lookup exists but delete failed"); }
Defensive patterns

Strategy: type-guard

Validate before calling

boolean hasLookups = coordinatorManager.getKnownLookups() != null;
if (!hasLookups) { /* skip deleteLookup or treat as success */ }

Type guard

boolean lookupsConfigured = coordinatorManager.getKnownLookups() != null;

Prevention

When it happens

Trigger: deleteLookup(tier, lookup) is called on a cluster with an empty/never-initialized lookup config store; the config manager returns null for LOOKUP_CONFIG_KEY.

Common situations: Deleting a lookup before any lookup was configured; fresh cluster bootstrap scripts assuming preexisting config; backing-store connectivity problems making the config appear absent.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at server/src/main/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManager.java:284

      final Map<String, Map<String, LookupExtractorFactoryMapContainer>> updateSpec = new HashMap<>(priorSpec);

      if (updateSpec.remove(tier) == null) {
        LOG.warn("Requested delete of tier [%s] that does not exist!", tier);
        return false;
      }

      return configManager.set(LOOKUP_CONFIG_KEY, updateSpec, auditInfo).isOk();
    }
  }

  public boolean deleteLookup(final String tier, final String lookup, AuditInfo auditInfo)
  {
    Preconditions.checkState(lifecycleLock.awaitStarted(5, TimeUnit.SECONDS), "not started");

    synchronized (this) {
      final Map<String, Map<String, LookupExtractorFactoryMapContainer>> priorSpec = getKnownLookups();
      if (priorSpec == null) {
        LOG.warn("Requested delete lookup [%s]/[%s]. But no lookups exist!", tier, lookup);
        return false;
      }
      final Map<String, Map<String, LookupExtractorFactoryMapContainer>> updateSpec = new HashMap<>(priorSpec);
      final Map<String, LookupExtractorFactoryMapContainer> priorTierSpec = updateSpec.get(tier);
      if (priorTierSpec == null) {
        LOG.warn("Requested delete of lookup [%s]/[%s] but tier does not exist!", tier, lookup);
        return false;
      }

      if (!priorTierSpec.containsKey(lookup)) {
        LOG.warn("Requested delete of lookup [%s]/[%s] but lookup does not exist!", tier, lookup);
        return false;
      }

      final Map<String, LookupExtractorFactoryMapContainer> updateTierSpec = new HashMap<>(priorTierSpec);
      updateTierSpec.remove(lookup);

      if (updateTierSpec.isEmpty()) {

View on GitHub (pinned to 9b90983fd2)