{"record":{"id":"248903977d3c9499","repo":"apache/druid","slug":"requested-delete-of-lookup-s-s-but-tier-does","errorCode":null,"errorMessage":"Requested delete of lookup [%s]/[%s] but tier does not exist!","messagePattern":"Requested delete of lookup \\[(.+?)\\]/\\[(.+?)\\] but tier does not exist!","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"server/src/main/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManager.java","lineNumber":290,"sourceCode":"\n      return configManager.set(LOOKUP_CONFIG_KEY, updateSpec, auditInfo).isOk();\n    }\n  }\n\n  public boolean deleteLookup(final String tier, final String lookup, AuditInfo auditInfo)\n  {\n    Preconditions.checkState(lifecycleLock.awaitStarted(5, TimeUnit.SECONDS), \"not started\");\n\n    synchronized (this) {\n      final Map<String, Map<String, LookupExtractorFactoryMapContainer>> priorSpec = getKnownLookups();\n      if (priorSpec == null) {\n        LOG.warn(\"Requested delete lookup [%s]/[%s]. But no lookups exist!\", tier, lookup);\n        return false;\n      }\n      final Map<String, Map<String, LookupExtractorFactoryMapContainer>> updateSpec = new HashMap<>(priorSpec);\n      final Map<String, LookupExtractorFactoryMapContainer> priorTierSpec = updateSpec.get(tier);\n      if (priorTierSpec == null) {\n        LOG.warn(\"Requested delete of lookup [%s]/[%s] but tier does not exist!\", tier, lookup);\n        return false;\n      }\n\n      if (!priorTierSpec.containsKey(lookup)) {\n        LOG.warn(\"Requested delete of lookup [%s]/[%s] but lookup does not exist!\", tier, lookup);\n        return false;\n      }\n\n      final Map<String, LookupExtractorFactoryMapContainer> updateTierSpec = new HashMap<>(priorTierSpec);\n      updateTierSpec.remove(lookup);\n\n      if (updateTierSpec.isEmpty()) {\n        updateSpec.remove(tier);\n      } else {\n        updateSpec.put(tier, updateTierSpec);\n      }\n      return configManager.set(LOOKUP_CONFIG_KEY, updateSpec, auditInfo).isOk();\n    }","sourceCodeStart":272,"sourceCodeEnd":308,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManager.java#L272-L308","documentation":"LookupCoordinatorManager.deleteLookup() logs this warning and returns false when the lookup config exists but the requested tier does not, so there is no tier map to remove the lookup from. No configuration change is persisted.","triggerScenarios":"deleteLookup(tier, lookup) runs with a tier name absent from the known-lookups map (priorTierSpec == null) — wrong tier name or tier previously deleted.","commonSituations":"DELETE /druid/coordinator/v1/lookups/{tier}/{lookup} with a misspelled tier; environments where lookups live under a different tier name (e.g., __default vs custom); multi-cluster tooling pointed at the wrong cluster.","solutions":["Fetch GET /druid/coordinator/v1/lookups/config and verify the tier name exactly.","Treat the false return as idempotent success when the target tier is expected to be gone.","Correct the tier name in the calling client or job config.","Check you are calling the intended cluster's coordinator (config/URL mismatch is common)."],"exampleFix":"// before\nmanager.deleteLookup(\"prod_tier\", \"country\");\n// after\nmanager.deleteLookup(\"__default\", \"country\"); // tier that actually exists","handlingStrategy":"validation","validationCode":"Map<String, Map<String, Object>> config = coordinatorManager.getKnownLookups();\nif (config == null || !config.containsKey(tier)) { /* tier missing: skip or correct the tier name */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Fetch the tier list before delete calls.","Use constants for tier names across tooling.","Confirm the target cluster's coordinator URL.","Treat false returns as idempotent success where appropriate."],"tags":["lookups","coordinator","delete","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}