{"record":{"id":"30526bd5e0d0b31a","repo":"apache/druid","slug":"datasource-s-not-found","errorCode":null,"errorMessage":"datasource[%s] not found","messagePattern":"datasource\\[(.+?)\\] not found","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"server/src/main/java/org/apache/druid/server/http/DataSourcesResource.java","lineNumber":267,"sourceCode":"      final SegmentsToUpdateFilter payload,\n      @Context final HttpServletRequest req\n  )\n  {\n    if (payload == null || !payload.isValid()) {\n      return Response\n          .status(Response.Status.BAD_REQUEST)\n          .entity(SegmentsToUpdateFilter.INVALID_PAYLOAD_ERROR_MESSAGE)\n          .build();\n    } else {\n      RemoteSegmentUpdateOperation remoteOperation\n          = () -> overlordClient.markSegmentsAsUnused(dataSourceName, payload);\n      return updateSegmentsViaOverlord(dataSourceName, remoteOperation);\n    }\n  }\n\n  private static Response logAndCreateDataSourceNotFoundResponse(String dataSourceName)\n  {\n    log.warn(\"datasource[%s] not found\", dataSourceName);\n    return Response.noContent().build();\n  }\n\n  private static Response updateSegmentsViaOverlord(\n      String dataSourceName,\n      RemoteSegmentUpdateOperation operation\n  )\n  {\n    try {\n      SegmentUpdateResponse response = FutureUtils.getUnchecked(operation.perform(), true);\n      return Response.ok(response).build();\n    }\n    catch (DruidException e) {\n      return ServletResourceUtils.buildErrorResponseFrom(e);\n    }\n    catch (Exception e) {\n      final Throwable rootCause = Throwables.getRootCause(e);\n      if (rootCause instanceof HttpResponseException) {","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/server/http/DataSourcesResource.java#L249-L285","documentation":"DataSourcesResource's coordinator HTTP API returns HTTP 204 (no content) for requests naming a datasource that does not exist, after logging this warning. Callers of queryable-datasource, intervals, segments, or load-status endpoints hit it when the dataSourceName path parameter matches no known datasource. It is an informational 'not found' signal, not a crash.","triggerScenarios":"GET/DELETE on /druid/coordinator/v1/datasources/{dataSourceName} (or its sub-resources: intervals, segments, loadstatus) where the datasource name is misspelled, dropped, or the metadata store has no such datasource.","commonSituations":"Typo in datasource name; datasource fully killed/removed from metadata but automation still polls it; race after datasource deletion; case-sensitivity mismatch.","solutions":["Verify the exact datasource name with `GET /druid/coordinator/v1/datasources` and correct the caller","Handle HTTP 204 in the client as 'datasource not found' rather than an error to retry","If the datasource should exist, check coordinator logs and metadata store connectivity for ingestion/segment publishing failures"],"exampleFix":"// before\ncurl http://coordinator:8081/druid/coordinator/v1/datasources/wikipeda\n// after\ncurl http://coordinator:8081/druid/coordinator/v1/datasources/wikipedia","handlingStrategy":"validation","validationCode":"final Set<String> existing = listDatasources(coordinatorUrl); if (!existing.contains(dsName)) { throw new IllegalArgumentException(\"unknown datasource: \" + dsName); }","typeGuard":"boolean datasourceExists(String ds, Set<String> known) { return ds != null && known.contains(ds); }","tryCatchPattern":"final Response r = client.target(url).request().get(); if (r.getStatus() == 204) { LOG.info(\"datasource {} not found; skipping\", dsName); return Optional.empty(); }","preventionTips":["Fetch the datasource list before calling per-datasource endpoints","Treat 204 as not-found, not as a transient error to retry","Standardize datasource names (case, spelling) via shared constants"],"tags":["http","coordinator","datasource","rest-api"],"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"}