bundle2: make server.bundle2.stream default to True
ClosedPublic

Authored by av6 on Sep 20 2018, 12:01 PM.

Details

Summary

Support for bundle2 streaming clones has been shipped in Mercurial 4.5
(7eedbd5d4880), but was never activated by default. It's time to have more
people use it. The new format allows streaming clones to transport cache
(hooray for speed) and phaseroots (fixes phase-related issues).

Changes in tests:

bundle2 capabilities now have "stream=v2" (plus a '\n' as a separator) and
therefore take 14 bytes more: "%0Astream%3Dv2". Tip for tests that have data
encoded with CBOR: 0xd3 - 0xc5 = 14.

$USUAL_BUNDLE2_CAPS$ replaces $USUAL_BUNDLE2_CAPS_SERVER$, which is the same
thing, but without "stream=v2".

Since streaming clones now also transfer caches, the reported byte and file
counts are higher (e.g. 816 bytes in 9 files instead of 613 bytes in 4 files,
a bit of --debug and manual math confirms that the caches take these extra 203
bytes in 5 files).

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
av6 created this revision.Sep 20 2018, 12:01 PM
indygreg accepted this revision.Sep 20 2018, 3:25 PM
indygreg added subscribers: sheehan, indygreg.

I'm comfortable enabling this useful feature by default.

IIRC we may still be lacking a story for denoting bundle2 stream clones in "bundle specs" for purposes of identifying compatible bundles in clonebundle manifests. We'll definitely want support for advertising version 2 stream clone bundles in clonebundle manifests. But, this shouldn't be a release blocker to enabling this feature (assuming the client fetches any existing bundle in the clone bundles manifest before attempting a stream clone).

@sheehan: this is definitely a feature we'll want to deploy on hg.mozilla.org and hook up to clone bundles.

This revision is now accepted and ready to land.Sep 20 2018, 3:25 PM
This revision was automatically updated to reflect the committed changes.