fix(storage): add Close() support to AsyncWriterConnectionBuffered#16145
Conversation
There was a problem hiding this comment.
Code Review
This pull request implements the Close functionality for AsyncWriterConnectionBuffered and its internal state, including handling close steps, state resumption on failures, and adding corresponding unit tests. The review feedback highlights two issues: first, a critical bug where CloseStep may be triggered before the resend_buffer_ is fully drained, leading to data loss; second, a potential issue where subsequent calls to Close() return an invalid future because closed_future_ is moved on the first invocation.
bc69cf7 to
fe49ad5
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16145 +/- ##
========================================
Coverage 92.20% 92.20%
========================================
Files 2264 2264
Lines 208864 209084 +220
========================================
+ Hits 192579 192786 +207
- Misses 16285 16298 +13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
c2dd166 to
a253210
Compare
|
/gcbrun |
This is a follow-up to #16112. It implements the Close() API in
AsyncWriterConnectionBufferedand its internal state managerAsyncWriterConnectionBufferedState. This allows buffered async uploads to perform a clean half-close after ensuring all previously buffered data is fully flushed.