You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "zjregee (via GitHub)" <gi...@apache.org> on 2025/02/18 07:11:30 UTC
[I] new feature: Add CRC32C checksum support for GCS [opendal]
zjregee opened a new issue, #5635:
URL: https://github.com/apache/opendal/issues/5635
### Feature Description
CRC32C is the algorithm recommended in the official documentation of GCS, and because OpenDAL S3 already provides a CRC32C checksum implementation, I think it is intuitive to add CRC32C checksum support to GCS.
### Problem and Solution
GCS Docs: https://cloud.google.com/storage/docs/data-validation.
### Additional Context
_No response_
### Are you willing to contribute to the development of this feature?
- [x] Yes, I am willing to contribute to the development of this feature.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] new feature: Add CRC32C checksum support for GCS [opendal]
Posted by "Xuanwo (via GitHub) via commits" <co...@opendal.apache.org>.
Xuanwo closed issue #5635: new feature: Add CRC32C checksum support for GCS
URL: https://github.com/apache/opendal/issues/5635
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] new feature: Add CRC32C checksum support for GCS [opendal]
Posted by "zjregee (via GitHub)" <gi...@apache.org>.
zjregee commented on issue #5635:
URL: https://github.com/apache/opendal/issues/5635#issuecomment-2664905328
Hi, @Xuanwo , thank you very much for your suggestions. I think we can first list some common services that support checksum algorithms, which may include the supported checksum algorithms, the use of checksum algorithms in different read and write methods, the scope of data verification, etc. I would be happy to find and provide a list like this.
In addition, after choosing some common checksum algorithms, maybe these services will initially just rely on these common functions and expose them to users by setting configuration like we do now, and then consider refactoring this part by possibly adding layers; or perhaps from the beginning, the most general design considerations are used to determine the future application mode of checksum in OpenDAL, and implement it on this basis.
I think the advantage of the first approach is that we can implement checksum for the most commonly used services first and accumulate knowledge for future general designs in the process. The advantage of the second approach is that if we design it clearly from the beginning, we can avoid repeated Implementation.
These are some of my simple ideas, and hope to get any suggestions. ๐
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] new feature: Add CRC32C checksum support for GCS [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #5635:
URL: https://github.com/apache/opendal/issues/5635#issuecomment-2664799363
Hi, before making an effort to add more checksum support to the services, I'm interested in discussing how we can achieve end-to-end checksum support at https://github.com/apache/opendal/issues/5549.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] new feature: Add CRC32C checksum support for GCS [opendal]
Posted by "Xuanwo (via GitHub) via commits" <co...@opendal.apache.org>.
Xuanwo commented on issue #5635:
URL: https://github.com/apache/opendal/issues/5635#issuecomment-7170305894
Do you already have the source object's CRC32C before starting the upload? If the uploaded bytes differ, does your application need the previous destination to stay intact (or a new key to stay absent), or can it compare the returned checksum after the write?
This matters for large GCS uploads. A JSON resumable upload can send the expected whole-object CRC32C on its final `PUT`. With XML multipart uploads, GCS can validate each part and returns the whole-object CRC32C when it completes the upload. By the time the caller compares that value, the new object may already be visible. [GCS data validation](https://cloud.google.com/storage/docs/data-validation) ยท [XML multipart completion](https://cloud.google.com/storage/docs/xml-api/post-object-complete)
#5549 tracks the shared checksum work. RFC-6817 describes passing an expected whole-object checksum and returning the final one, and #7830 covers part of the write API. Your answer would clarify what the GCS implementation needs to guarantee. [RFC-6817](https://github.com/apache/opendal/blob/0bcf6b4/core/core/src/docs/rfcs/6817_checksum.md)
*AI-generated maintenance comment.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] new feature: Add CRC32C checksum support for GCS [opendal]
Posted by "Xuanwo (via GitHub) via commits" <co...@opendal.apache.org>.
Xuanwo commented on issue #5635:
URL: https://github.com/apache/opendal/issues/5635#issuecomment-7207248651
CRC32C write verification and stored CRC32C metadata support for GCS have been merged to `main` in #9216 (`bdd8a57028`; not included in the latest release `v0.59.5`).
On the authenticated default GCS JSON endpoint:
- **Write verification:** Pass `ChecksumAlgo::Crc32c` (or `WriteChecksum::Fast` / `WriteChecksum::Any`) to `op.write_with(path, data).checksum(...)` or `op.writer_with(path).checksum(...)` to compute and verify CRC32C over the streamed bytes, or pass `Checksum::new(ChecksumAlgo::Crc32c, digest_bytes)` (4-byte big-endian digest) to verify an already-known CRC32C. Successful checksum writes return the verified digest in `Metadata::checksum()`.
- **Pre-commit rejection:** Verified against real GCS, a mismatched CRC32C is rejected before commit with `ErrorKind::ChecksumMismatch` without committing a new object generation, preserving the existing generation on overwrite.
- **Stored checksum metadata:** Stored CRC32C is available via `Metadata::checksum()` on `stat` and on `Reader::metadata()` when a read response covers the complete stored representation (partial or transcoded/decompressed responses omit it; reads do not perform client-side verification by default).
Explicit write checksum intents are not supported on custom endpoints, unsigned/anonymous configurations, or presigned writes.
Closing this issue as completed.
*AI-generated maintenance comment.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org