Skip to content

feat(storage): Add full object checksum validation for appendable uploads#16219

Open
v-pratap wants to merge 8 commits into
googleapis:mainfrom
v-pratap:fastbyte-full-object-checksum-final
Open

feat(storage): Add full object checksum validation for appendable uploads#16219
v-pratap wants to merge 8 commits into
googleapis:mainfrom
v-pratap:fastbyte-full-object-checksum-final

Conversation

@v-pratap

Copy link
Copy Markdown
Contributor

No description provided.

@v-pratap v-pratap requested review from a team as code owners June 30, 2026 06:34
@product-auto-label product-auto-label Bot added the api: storage Issues related to the Cloud Storage API. label Jun 30, 2026
@v-pratap v-pratap requested a review from kalragauri June 30, 2026 06:34
@v-pratap v-pratap force-pushed the fastbyte-full-object-checksum-final branch from 3aad347 to 915cef5 Compare June 30, 2026 06:35

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for CRC32C checksum validation during asynchronous uploads, specifically during finalization, resume, and flush operations. It updates the AsyncWriter interface and its underlying connection implementations to accept and verify expected checksums, and enhances HashFunction to support state retrieval and restoration. The review feedback highlights three critical issues: a compilation error in AsyncWriterConnectionImpl::Finalize caused by inconsistent return types in a lambda, and two data races in AsyncWriterConnectionResumed where impl_ is accessed concurrently without holding the appropriate mutex lock.

Comment thread google/cloud/storage/internal/async/writer_connection_impl.cc
Comment thread google/cloud/storage/internal/async/writer_connection_resumed.cc Outdated
Comment thread google/cloud/storage/internal/async/writer_connection_resumed.cc
@v-pratap v-pratap added the do not review Indicates a PR is not ready for review label Jun 30, 2026
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.99415% with 65 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.21%. Comparing base (f1a8e57) to head (1399a03).

Files with missing lines Patch % Lines
...torage/internal/async/writer_connection_resumed.cc 75.26% 23 Missing ⚠️
...le/cloud/storage/internal/async/connection_impl.cc 44.82% 16 Missing ⚠️
google/cloud/storage/internal/hash_function_impl.h 14.28% 12 Missing ⚠️
...orage/internal/async/writer_connection_buffered.cc 54.54% 5 Missing ⚠️
google/cloud/storage/internal/hash_function.h 0.00% 4 Missing ⚠️
google/cloud/storage/async/writer.cc 71.42% 2 Missing ⚠️
...torage/internal/async/writer_connection_tracing.cc 60.00% 2 Missing ⚠️
...e/internal/async/writer_connection_resumed_test.cc 98.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16219      +/-   ##
==========================================
- Coverage   92.23%   92.21%   -0.03%     
==========================================
  Files        2265     2265              
  Lines      210205   210340     +135     
==========================================
+ Hits       193888   193967      +79     
- Misses      16317    16373      +56     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API. do not review Indicates a PR is not ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant