-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Is your feature request related to a problem? Please describe:
The current Azure Java SDK (v12) appears to lack built-in support for transactional CRC64 validation during blob transfers.
While the .NET SDK provides a UseTransactionalCRC64 property (in ChecksumOptions) and StorageChecksumAlgorithm.StorageCrc64 (in v12) to automatically calculate and validate CRC64 hashes for individual REST operations, the Java SDK primarily relies on MD5 (setComputeMd5).
For scenarios where CRC64 is preferred (e.g., performance considerations on certain hardware or specific compliance requirements), or when migrating legacy systems that rely on CRC64 validation, the lack of a direct configuration in ParallelTransferOptions or BlobUploadOptions forces developers to manually implement complex custom logic or fallback to MD5.
Describe the solution you'd like:
I would like to request first-class support for transactional CRC64 validation in the Java SDK, similar to the .NET implementation.
Ideally, this would look like:
- Adding a method like
setComputeCrc64(boolean)toParallelTransferOptions. - Or introducing a
setChecksumAlgorithm(StorageChecksumAlgorithm)method where one can choose betweenMD5andCRC64. - The SDK should handle the calculation of the CRC64 hash for the block/blob and set the
x-ms-content-crc64header automatically during upload/download.
Describe alternatives you've considered:
- Using MD5 (
setComputeMd5(true)), which is currently supported but may not meet specific requirements. - Relying solely on HTTPS/TLS for transport layer security, which doesn't protect against application-level data corruption.
- Manually calculating CRC64 and setting headers, which is error-prone and difficult to integrate with the high-level
BlobClientconvenience methods.
Additional context:
- .NET SDK Reference:
ChecksumOptions.UseTransactionalCRC64 - REST API Reference:
x-ms-content-crc64header support. - Parity with other language SDKs (like .NET and Go) would improve the cross-platform developer experience.