{"record":{"id":"0b752fa5900de68b","repo":"apache/druid","slug":"no-files-were-deleted-on-the-following-azure-path","errorCode":null,"errorMessage":"No files were deleted on the following Azure path: [%s]","messagePattern":"No files were deleted on the following Azure path: \\[(.+?)\\]","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"extensions-core/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureStorage.java","lineNumber":130,"sourceCode":"    // https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-list The new client uses flat listing by default.\n    final PagedIterable<BlobItem> blobItems = blobContainerClient.listBlobs(\n        new ListBlobsOptions().setPrefix(prefix),\n        Duration.ofMillis(DELTA_BACKOFF_MS)\n    );\n\n    final List<String> deletedFiles = new ArrayList<>();\n    blobItems.iterableByPage().forEach(\n        page -> page.getElements().forEach(\n            blob -> {\n              if (blobContainerClient.getBlobClient(blob.getName()).deleteIfExists()) {\n                deletedFiles.add(blob.getName());\n              }\n            }\n        )\n    );\n\n    if (deletedFiles.isEmpty()) {\n      LOG.warn(\"No files were deleted on the following Azure path: [%s]\", prefix);\n    }\n\n    return deletedFiles;\n  }\n\n  /**\n   * Creates and opens an output stream to write data to the block blob.\n   * <p>\n   * If the blob already exists, an exception will be thrown.\n   *\n   * @param containerName The name of the storage container.\n   * @param blobName      The name of the blob within the container.\n   * @param blockSize     (Optional) The block size to use when writing the blob.\n   *                      If null, the default block size will be used.\n   * @param maxAttempts   (Optional) The maximum number of attempts to retry the upload in case of failure.\n   *                      If null, the default value from the system configuration (`druid.azure.maxTries`) will be used.\n   *\n   * @return An OutputStream for writing the blob.","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-core/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureStorage.java#L112-L148","documentation":"AzureStorage.emptyCloudBlobDirectory() lists and deletes blobs under a given prefix and returns the list of deleted files. When nothing was deleted it logs this warning before returning the empty list — it does not throw. The warning helps distinguish 'nothing existed to delete' from a silent no-op during directory cleanup.","triggerScenarios":"Calling emptyCloudBlobDirectory (or deleteObjectsInPath that wraps it) with a prefix under which no blobs exist, or none could be deleted (e.g., already gone).","commonSituations":"Deleting a segment directory that was already removed; typo in the prefix (wrong datasource/interval path); a concurrent kill task already deleted the blobs; drained or newly created datasources.","solutions":["Verify the prefix path is correct (datasource/interval formatting) before calling delete/kill","Treat the empty return list as an idempotent no-op if the directory was already expected to be empty","List the container/prefix with a storage explorer to confirm whether blobs ever existed","If the path should exist, check for concurrent kill/cleanup tasks racing with this operation","Silence/expect this warning for kill operations on datasources with no segments"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// confirm the prefix exists before treating empty deletion as an error\nboolean hasBlobs = !storage.listPrefix(container, prefix).isEmpty();","typeGuard":null,"tryCatchPattern":"List<String> deleted = storage.emptyCloudBlobDirectory(container, prefix);\nif (deleted.isEmpty()) {\n  LOG.info(\"Nothing deleted for %s — already empty or wrong prefix\", prefix);\n}","preventionTips":["Verify datasource/interval prefix spelling before kill operations","Treat empty deletions as idempotent success when racing with other cleanup","List the prefix first when deletions are expected to be non-empty"],"tags":["azure","storage","deletion","empty-result"],"backgroundTag":"empty-result-set","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}