Skip to content

Commit 41f95ed

Browse files
authored
Azure: Explain why we don't use batch delete (#114379)
1 parent 5f25cf9 commit 41f95ed

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureBlobStore.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,19 @@ private static void filterDeleteExceptionsAndRethrow(Exception e, IOException ex
278278
throw exception;
279279
}
280280

281+
/**
282+
* {@inheritDoc}
283+
* <p>
284+
* Note that in this Azure implementation we issue a series of individual
285+
* <a href="https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob">delete blob</a> calls rather than aggregating
286+
* deletions into <a href="https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch">blob batch</a> calls.
287+
* The reason for this is that the blob batch endpoint has limited support for SAS token authentication.
288+
*
289+
* @see <a href="https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch?tabs=shared-access-signatures#authorization">
290+
* API docs around SAS auth limitations</a>
291+
* @see <a href="https://github.com/Azure/azure-storage-java/issues/538">Java SDK issue</a>
292+
* @see <a href="https://github.com/elastic/elasticsearch/pull/65140#discussion_r528752070">Discussion on implementing PR</a>
293+
*/
281294
@Override
282295
public void deleteBlobsIgnoringIfNotExists(OperationPurpose purpose, Iterator<String> blobs) {
283296
if (blobs.hasNext() == false) {

0 commit comments

Comments
 (0)