repository: drop "wait" arg, make put/delete synchronous#9782
Merged
ThomasWaldmann merged 1 commit intoJun 16, 2026
Merged
Conversation
The new borgstore-based Repository inherited put(..., wait=) / delete(..., wait=) and async_response() from the legacy RemoteRepository's pipelined RPC protocol. In the new architecture these are dead: borgstore's API is strictly synchronous, so put/delete ignored wait and ran synchronously, and async_response() was an empty stub always returning None. Remove wait and async_response() so the synchronous behavior is explicit, and clean up every caller that still threaded wait=False / drained async_response() (cache.add_chunk, archive.py, transfer_cmd.py, and the archive_test mock). The legacy repository/remote keep their real wait/async implementation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9782 +/- ##
=======================================
Coverage 84.88% 84.89%
=======================================
Files 92 92
Lines 15172 15161 -11
Branches 2275 2273 -2
=======================================
- Hits 12879 12871 -8
+ Misses 1589 1588 -1
+ Partials 704 702 -2 ☔ View full report in Codecov by Harness. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The new borgstore-based
Repositorystill carriedput(..., wait=)/delete(..., wait=)and anasync_response()method, inherited from the legacyRemoteRepository's pipelined RPC protocol.In the new architecture these are dead:
Store/backend API is strictly synchronous, soput/deleteignoredwaitand always ran synchronously;async_response()was an empty stub that always returnedNone.This PR removes
waitandasync_response()so the synchronous behavior is explicit, and cleans up every caller that still threadedwait=False/ drainedasync_response():Repository.put/Repository.delete— dropwait; removeasync_response().Cache.add_chunk— dropwait, callrepository.put(id, cdata).archive.py— dropwait=Falsefrom the threeadd_chunkcalls, remove the per-callasync_response(wait=False)and thewhile ... async_response(wait=True)drain loop insave().archiver/transfer_cmd.py— dropwait=Falsefrom theadd_chunkcalls and theasync_response(wait=False)line.testsuite/archive_test.py— update theMockCachemock accordingly.src/borg/legacy/is intentionally untouched — the legacy repository/remote keep their realwait/async implementation.Testing
pytest src/borg/testsuite/archive_test.py src/borg/testsuite/repository_test.py→ all pass.repo-create→create→transfer→checkacross two local repos, exercising thewrite_chunkand transfer paths that previously usedwait=False. All OK.🤖 Generated with Claude Code