fix(storage): add Close() support to AsyncWriterConnectionBuffered#16145
fix(storage): add Close() support to AsyncWriterConnectionBuffered#16145kalragauri wants to merge 4 commits into
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.72% 92.72%
========================================
Files 2356 2356
Lines 220638 220858 +220
========================================
+ Hits 204589 204794 +205
- Misses 16049 16064 +15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.