{"record":{"id":"cf036f1e63c8d5be","repo":"apache/druid","slug":"requested-delete-lookup-s-s-but-no-lookups","errorCode":null,"errorMessage":"Requested delete lookup [%s]/[%s]. But no lookups exist!","messagePattern":"Requested delete lookup \\[(.+?)\\]/\\[(.+?)\\]\\. But no lookups exist!","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"server/src/main/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManager.java","lineNumber":284,"sourceCode":"      final Map<String, Map<String, LookupExtractorFactoryMapContainer>> updateSpec = new HashMap<>(priorSpec);\n\n      if (updateSpec.remove(tier) == null) {\n        LOG.warn(\"Requested delete of tier [%s] that does not exist!\", tier);\n        return false;\n      }\n\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()) {","sourceCodeStart":266,"sourceCodeEnd":302,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/server/lookup/cache/LookupCoordinatorManager.java#L266-L302","documentation":"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.","triggerScenarios":"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.","commonSituations":"Deleting a lookup before any lookup was configured; fresh cluster bootstrap scripts assuming preexisting config; backing-store connectivity problems making the config appear absent.","solutions":["Confirm existing lookup config: GET /druid/coordinator/v1/lookups/config.","Treat false as idempotent success if the lookup should not exist anyway.","If lookups were expected, check the lookup config manager's connectivity to its storage and node announcements.","Adjust client code to check the boolean return instead of expecting an exception."],"exampleFix":"// before\nif (!manager.deleteLookup(\"__default\", \"country\")) { throw new IllegalStateException(\"delete failed\"); }\n// after\nif (!manager.deleteLookup(\"__default\", \"country\") && manager.getKnownLookups() != null) { throw new IllegalStateException(\"lookup exists but delete failed\"); }","handlingStrategy":"type-guard","validationCode":"boolean hasLookups = coordinatorManager.getKnownLookups() != null;\nif (!hasLookups) { /* skip deleteLookup or treat as success */ }","typeGuard":"boolean lookupsConfigured = coordinatorManager.getKnownLookups() != null;","tryCatchPattern":null,"preventionTips":["Configure lookups before running delete jobs.","Null-check getKnownLookups() in client code.","Check config-store connectivity if null is unexpected.","Treat the false return as an idempotent no-op."],"tags":["lookups","coordinator","delete","noop"],"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"}