feat(storage): implement replay buffer for appendable upload - #6605
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new ReplayBuffer module to manage unacknowledged data chunks, trim acknowledged data, and support resending chunks upon stream reconnection. The reviewer suggested refactoring the acknowledge method to separate the loop logic and adding a safety comment explaining the invariants when slicing the chunk data.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6605 +/- ##
==========================================
- Coverage 97.17% 97.17% -0.01%
==========================================
Files 328 329 +1
Lines 109802 109974 +172
==========================================
+ Hits 106702 106867 +165
- Misses 3100 3107 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
0ae57e5 to
4ccbe87
Compare
4ccbe87 to
cdefb94
Compare
xlai20
left a comment
There was a problem hiding this comment.
I would say it's in general a ready to merge state except 2 nits.
- Drop the unreachable expect() by reading the front chunk length before popping it, removing the redundant panic branch. - Relabel the // SAFETY: comment as // Invariant:, since Bytes::slice is safe Rust and the comment documents an algorithmic invariant, not an unsafe contract.
cdefb94 to
2814ea2
Compare
Olivia has approved. Thanks!
Issue #5716 .