OXYGENHUB

A push re-sends the blobs a change's replacements name, though the remote holds them issue #136 closed: completed andymccall opened this · 1 comment

andymccall

Found with oxygen#133 (2026-10-25): oxygenhub-android's set-up change removes ~1,100 tracked cache files, and its push carried 2,272 blobs and chunks (over 100 MB). bundle_of (crates/oxy-core/src/repo/sync.rs) adds, for every Edit::Replace, both the old and the new blob with their chunks, so removing a binary file sends its old content again, though the remote stored it when the file was added. issue #133 makes such a push go through (objects ahead in parts), but it is still far more than it needs.

Fix: leave out blobs the remote already has. Negotiation knows the remote's heads: an old blob is the new of an earlier change the remote holds, so it can be skipped (or ask with objects/a has-check before sending). The receiver needs only that the blobs a change names are stored. Measure with the android repository's history (a fresh hub repo, push, count bytes).

andymccall set labels bug ·

closed by change 570e35310f31 ·

andymccall

Fixed in 3180176b: a bundle carries a replacement's new blob only (spec §16 says so now). Measured locally on oxygenhub-android, pushing its two set-up commits (issue #1, issue #2) to an oxy serve remote that already held the history before them:

oxy 0.6.03180176b
blobs and chunks sent2,2721,405
bytes sent240 MB184 MB
time (loopback)2.3 s1.5 s

A fresh push of the whole history gains too (478 MB → 366 MB): a long push goes in parts, and each part re-sent the old blobs of files added in earlier parts. The rest is new content. Measuring found issue #138 (oxy serve refused any push over 2 MB).