feat(storage): implement replay buffer for appendable upload - #6605
feat(storage): implement replay buffer for appendable upload#6605vsharonlynn wants to merge 3 commits into
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 96.72% 96.72% -0.01%
==========================================
Files 313 314 +1
Lines 101266 101438 +172
==========================================
+ Hits 97948 98112 +164
- Misses 3318 3326 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
0ae57e5 to
4ccbe87
Compare
| /// Defines the maximum capacity of the replay buffer in bytes (32 MiB). | ||
| pub const MAX_REPLAY_BUFFER_SIZE: usize = 32 * 1024 * 1024; |
There was a problem hiding this comment.
Is 32MiB the "One True Value" for some reason? Shouldn't this be configurable? If not, could you add a comment explaining why this is the only correct value?
There was a problem hiding this comment.
No, it's not the one true value. It is the intended default.
Added with_capacity method. Currently default value is 32MiB.
I'll write follow-up PRs on setting this at the request level (and maybe client-level) to keep this PR focused on replay_buffer.rs.
Thanks Carlos.
4ccbe87 to
cdefb94
Compare
Issue #5716 .