Skip to content

fix(storage): add Close() support to AsyncWriterConnectionResumed#16163

Open
kalragauri wants to merge 2 commits into
googleapis:mainfrom
kalragauri:feature/appendable-close
Open

fix(storage): add Close() support to AsyncWriterConnectionResumed#16163
kalragauri wants to merge 2 commits into
googleapis:mainfrom
kalragauri:feature/appendable-close

Conversation

@kalragauri

Copy link
Copy Markdown
Contributor

This is a follow-up to #16112. It implements the Close() API in AsyncWriterConnectionResumed and its internal state manager AsyncWriterConnectionResumedState. This allows resumed async uploads to perform a clean half-close.

This PR is similar to the Close implementation for the buffered writer in #16145.

@product-auto-label product-auto-label Bot added the api: storage Issues related to the Cloud Storage API. label Jun 15, 2026

@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 implements the Close functionality for AsyncWriterConnectionResumed, adding the necessary state tracking, step functions, and resume handling, along with comprehensive unit tests. The review feedback suggests optimizing performance by passing Status objects by value and moving them in OnClose and SetClosed to avoid unnecessary copies, and correcting the misspelled test suite name WriteConnectionResumed to WriterConnectionResumed in the new tests.

Comment thread google/cloud/storage/internal/async/writer_connection_resumed.cc Outdated
Comment thread google/cloud/storage/internal/async/writer_connection_resumed.cc Outdated
Comment thread google/cloud/storage/internal/async/writer_connection_resumed_test.cc Outdated
@kalragauri kalragauri marked this pull request as ready for review June 15, 2026 10:12
@kalragauri kalragauri requested review from a team as code owners June 15, 2026 10:12
@kalragauri kalragauri force-pushed the feature/appendable-close branch from 2b28218 to 1da8c41 Compare June 15, 2026 10:24
@kalragauri kalragauri requested a review from v-pratap June 15, 2026 10:25
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.92593% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.21%. Comparing base (ce5aa34) to head (92a06ce).

Files with missing lines Patch % Lines
...torage/internal/async/writer_connection_resumed.cc 88.54% 11 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #16163    +/-   ##
========================================
  Coverage   92.20%   92.21%            
========================================
  Files        2264     2264            
  Lines      209092   209324   +232     
========================================
+ Hits       192802   193028   +226     
- Misses      16290    16296     +6     

☔ 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant