Skip to content

fix: chunk store_load over RPC to avoid msgpack BufferFull.#9544

Closed
hiijoshi wants to merge 4 commits intoborgbackup:masterfrom
hiijoshi:fix/store-load-chunked-rpc
Closed

fix: chunk store_load over RPC to avoid msgpack BufferFull.#9544
hiijoshi wants to merge 4 commits intoborgbackup:masterfrom
hiijoshi:fix/store-load-chunked-rpc

Conversation

@hiijoshi
Copy link
Contributor

Fixes a crash when loading large stores via RPC

@hiijoshi hiijoshi force-pushed the fix/store-load-chunked-rpc branch 4 times, most recently from 39cfeb9 to 899c9ec Compare March 25, 2026 15:13
Large repositories can have a chunks index exceeding the msgpack
unpacker buffer size, causing BufferFull errors over SSH/RPC.

Instead of loading the entire value in one RPC call, add two new
server-side methods (store_get_size, store_load_chunk) and override
store_load in RemoteRepository to fetch data in MAX_DATA_SIZE pieces,
reassembling on the client side.

Fixes borgbackup#8440
@hiijoshi hiijoshi force-pushed the fix/store-load-chunked-rpc branch from 899c9ec to 3531c82 Compare March 25, 2026 15:18
@codecov
Copy link

codecov bot commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.00%. Comparing base (9d5687d) to head (3531c82).
⚠️ Report is 6 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/borg/helpers/parseformat.py 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9544      +/-   ##
==========================================
- Coverage   83.39%   83.00%   -0.40%     
==========================================
  Files          87       87              
  Lines       15469    15489      +20     
  Branches     2321     2324       +3     
==========================================
- Hits        12901    12857      -44     
- Misses       1818     1877      +59     
- Partials      750      755       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hiijoshi hiijoshi force-pushed the fix/store-load-chunked-rpc branch from bee6d62 to ff1646a Compare March 25, 2026 16:12
@hiijoshi hiijoshi force-pushed the fix/store-load-chunked-rpc branch from ff1646a to 36fdb56 Compare March 25, 2026 16:22
@hiijoshi hiijoshi force-pushed the fix/store-load-chunked-rpc branch from e623a84 to a4e4412 Compare March 25, 2026 16:39
@ThomasWaldmann
Copy link
Member

Your PRs are a mess and I am tired of reviewing them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants