Azure / Azure/azure-sdk-for-java

[FEATURE REQ] Support transactional CRC64 checksums

Open
#47,424 4 comments 0 reactions 1 assignee Claimed by @ibrandes View on GitHub
customer-reported feature-request needs-team-attention Storage
Dominant language
Java
Stars
2.6k
Forks
2.2k
Avg merge
2d 8h
Merged PRs (30d)
178

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)` to `ParallelTransferOptions`.
- Or introducing a `setChecksumAlgorithm(StorageChecksumAlgorithm)` method where one can choose between `MD5` and `CRC64`.
- The SDK should handle the calculation of the CRC64 hash for the block/blob and set the `x-ms-content-crc64` header 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 `BlobClient` convenience methods.

**Additional context:**
- .NET SDK Reference: `ChecksumOptions.UseTransactionalCRC64`
- REST API Reference: `x-ms-content-crc64` header support.
- Parity with other language SDKs (like .NET and Go) would improve the cross-platform developer experience.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.