You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2026/06/06 05:22:02 UTC
(camel) branch main updated: CAMEL-19254: Document blob ConditionNotMet error during concurrent modification (#23803)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 090b67e5b4a0 CAMEL-19254: Document blob ConditionNotMet error during concurrent modification (#23803)
090b67e5b4a0 is described below
commit 090b67e5b4a0274455b7c496100befaafc281f24
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Jun 6 07:21:55 2026 +0200
CAMEL-19254: Document blob ConditionNotMet error during concurrent modification (#23803)
Signed-off-by: Claus Ibsen <cl...@gmail.com>
Co-authored-by: Claude <no...@anthropic.com>
---
.../src/main/docs/azure-storage-blob-component.adoc | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-component.adoc b/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-component.adoc
index 1f7621f0f247..fcdc6e93dda8 100644
--- a/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-component.adoc
+++ b/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-component.adoc
@@ -892,6 +892,22 @@ from("direct:rehydrate")
.to("mock:result");
--------------------------------------------------------------------------------
+=== Blob modification during download (ConditionNotMet)
+
+When downloading a blob via streaming (the `getBlob` operation or the consumer without `fileDir`), the Azure SDK reads the blob in chunks.
+On the first chunk it captures the blob's ETag and uses it as an `if-match` condition on subsequent chunk requests.
+If the blob is modified by another process between chunks (which changes its ETag), Azure returns HTTP 412 `ConditionNotMet`.
+
+This is by design in the Azure SDK — it ensures read consistency so that you do not receive half of one version concatenated with half of another.
+The error is more likely with larger blobs and slower network connections (e.g., in real Azure environments versus local emulators).
+
+Workarounds:
+
+* Use the `fileDir` option so the consumer downloads the blob atomically to a file via `downloadBlobToFile` instead of streaming.
+* Use blob snapshots — read from an immutable snapshot ID via the `snapshotId` option or the `CamelAzureStorageBlobSnapshotId` header, which cannot be modified.
+* Use blob versioning — read from a specific version via the `versionId` option or the `CamelAzureStorageBlobVersionId` header.
+* Avoid modifying blobs while they are being consumed.
+
=== SAS Token generation example
SAS Blob Container tokens can be generated programmatically or via Azure UI. To generate the token with java code, the following can be done: