I am uploading files to azure blob storage (~1.4 GB) via Java SDK using com.azure.storage.blob.specialized.BlockBlobClient. In some situation my program was terminated before committing the uploaded blobs (application had a short timeout before interrupting). As this happened for a lot of files, it seems I have reached near the limit of 100 000 uncommitted blocks. Now when I try to upload such a file again, it fails with:
com.azure.storage.blob.models.BlobStorageException: Status code 409, "<?xml version="1.0" encoding="utf-8"?<Error><Code>BlockCountExceedsLimit</Code><Message>The uncommitted block count cannot exceed the maximum limit of 100,000 blocks.
I found this troubleshooting page related to my issue: https://learn.microsoft.com/en-us/troubleshoot/azure/general/invalid-blob-or-block-content-or-invalid-block-list
"Solution 1" Waiting 7 days, does not sound serious. It is not a real option for me.
Solution 2 : ... In my case I don't know what is "the same blob name". I lost the information which blobs uploads were interrupted. So this solution seems not applicable to me. Is there any way how to figure them out?
Solution 3 : I tried to get uncommitted blocks but again to get the uncommitted block list I need first to know the original blob name. Something like: containerClient.getBlobClient(<the_name>).getBlockBlobClient()..listBlocks(BlockListType.UNCOMMITTED).getUncommittedBlocks();
Is that correct? How can I take the names of the blobs with uncommitted blocks?
I would like to delete those uncommitted blocks. But I cannot reach them. Is there a way to see them form the Azure portal, in the storage browser? Maybe to filter by blobs having uncommitted blocks?
Best regards,
Slavomir