{"record":{"id":"a237bc2f37509982","repo":"apache/druid","slug":"cannot-delete-all-segment-files-from-google-deep-s","errorCode":null,"errorMessage":"Cannot delete all segment files from Google Deep Storage since druid.google.bucket and druid.google.prefix are not both set.","messagePattern":"Cannot delete all segment files from Google Deep Storage since druid\\.google\\.bucket and druid\\.google\\.prefix are not both set\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":500,"severity":"error","filePath":"extensions-core/google-extensions/src/main/java/org/apache/druid/storage/google/GoogleDataSegmentKiller.java","lineNumber":97,"sourceCode":"    try {\n      GoogleUtils.retryGoogleCloudStorageOperation(() -> {\n        storage.delete(bucket, path);\n        return null;\n      });\n    }\n    catch (StorageException e) {\n      throw e;\n    }\n    catch (Exception e) {\n      throw new RE(e, \"Failed to delete google cloud storage object from bucket [%s] and path [%s].\", bucket, path);\n    }\n  }\n\n  @Override\n  public void killAll() throws IOException\n  {\n    if (accountConfig.getBucket() == null || accountConfig.getPrefix() == null) {\n      throw new ISE(\n          \"Cannot delete all segment files from Google Deep Storage since druid.google.bucket and druid.google.prefix are not both set.\");\n    }\n    LOG.info(\n        \"Deleting all segment files from gs location [bucket: '%s' prefix: '%s']\",\n        accountConfig.getBucket(),\n        accountConfig.getPrefix()\n    );\n    try {\n      GoogleUtils.deleteObjectsInPath(\n          storage,\n          inputDataConfig,\n          accountConfig.getBucket(),\n          accountConfig.getPrefix(),\n          Predicates.alwaysTrue()\n      );\n    }\n    catch (Exception e) {\n      LOG.error(\"Error occurred while deleting task log files from gs. Error: %s\", e.getMessage());","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-core/google-extensions/src/main/java/org/apache/druid/storage/google/GoogleDataSegmentKiller.java#L79-L115","documentation":"GoogleDataSegmentKiller.killAll deletes every segment file under the configured bucket/prefix in Google Deep Storage. It refuses to run (ISE) unless both druid.google.bucket and druid.google.prefix are set in the GoogleAccountConfig, because running without both could delete from the wrong location or fail ambiguously.","triggerScenarios":"Calling killAll() (e.g. from the task logs cleanup/kill-all endpoint) when the Google account config has a null bucket or null prefix — i.e. auth via other means (service name / credentials) but no explicit bucket+prefix configured.","commonSituations":"Druid deployments where GCS storage is configured for pushing but druid.google.bucket and druid.google.prefix are not both present in the kill-all node's config; using workload-identity/service-account-based config without bucket/prefix.","solutions":["Set both druid.google.bucket and druid.google.prefix in the runtime properties of the node performing killAll","Verify the config is loaded on the correct service (overlord/coordinator doing cleanup)","If bucket/prefix legitimately cannot be set, use per-segment kill instead of killAll"],"exampleFix":"// before\n# runtime.properties\n# druid.google.bucket not set\n// after\ndruid.google.bucket=my-segment-bucket\ndruid.google.prefix=segments","handlingStrategy":"validation","validationCode":"// Before calling killAll\nif (System.getProperty(\"druid.google.bucket\") == null || System.getProperty(\"druid.google.prefix\") == null) { throw new IllegalStateException(\"druid.google.bucket and druid.google.prefix required\"); }","typeGuard":null,"tryCatchPattern":"try { killer.killAll(); } catch (IllegalStateException e) { LOGGER.error(e, \"Fix druid.google.bucket/prefix config\"); }","preventionTips":["Set druid.google.bucket and druid.google.prefix on every node that may run killAll","Add config validation to deployment scripts","Document that killAll requires explicit bucket+prefix, not credential-only config"],"tags":["config-validation","missing-config","google-cloud-storage","apache-druid"],"backgroundTag":"missing-required-config-field","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}