[
https://issues.apache.org/jira/browse/CAMEL-26582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-26582:
--------------------------------
Fix Version/s: 4.24.0
> camel-azure-storage-datalake - flush at the absolute final position
> -------------------------------------------------------------------
>
> Key: CAMEL-26582
> URL: https://issues.apache.org/jira/browse/CAMEL-26582
> Project: Camel
> Issue Type: Bug
> Components: camel-azure
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.24.0
>
>
> `components/camel-azure/camel-azure-storage-datalake/src/main/java/org/apache/camel/component/azure/storage/datalake/operations/DataLakeFileOperations.java:191`
> ```java
> final long flushPosition = (position != null ? position : 0L) +
> fileClientWrapper.getFileSize();
> ```
> POSITION is documented at DataLakeConstants.java:184 as the final file
> length. A committed 100-byte file with another 20 bytes appended should flush
> at 120; supplying Position=120 sends 220. The wrapper forwards the wrong
> length unchanged. Use the supplied absolute position, and define the
> no-position fallback explicitly. A correction changes longstanding behavior
> and needs an upgrade note.
> History: CAMEL-24159 / f6ae9ecad39b added the null guard while retaining the
> earlier addition. Test nonempty-file flushing; an empty file hides this error.
> [Microsoft API
> reference](https://learn.microsoft.com/en-us/java/api/com.azure.storage.file.datalake.datalakefileclient?view=azure-java-stable)
> defines position as the final file length.
> Expected behavior: the operation honors its documented contract, including
> exceptional and terminal paths. Add regression tests for the triggering case
> described above.
> Audited against upstream main 3658e02a7f9d. AI-generated by Codex on behalf
> of oscerd (JIRA acosentino).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)