D1856: wireproto: support for pullbundles

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Mon Jan 15 17:39:07 EST 2018


indygreg added a comment.


  In https://phab.mercurial-scm.org/D1856#31536, @indygreg wrote:
  
  > In https://phab.mercurial-scm.org/D1856#31522, @durin42 wrote:
  >
  > > I'm too rusty on bundle2 at the moment to grok what magic would be required to pre-compress payloads.
  >
  >
  > The ideal solution would be a way to //reset// the context for the byte stream. Essentially we'd add a marker telling consumers they've reached EOF of either a bundle2 stream or a compression context. The next byte should be interpreted as a new bundle2 stream or a new compression context.
  
  
  I should add that if clients automatically consumed all bundle2 payloads sent by the server and the compression context was automatically reset after end of bundle2 payload, then the easiest path forward is likely having the client advertise that it can receive multiple bundle2 payloads and then we implement this feature in terms of sending multiple bundle2 payloads. As long as the compression context is flushed, we should be OK. But we model the response stream as a single stream and feed that whole thing into a compressor/decompressor. We'd need to hack up the compression code a bit no matter what path we use.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1856

To: joerg.sonnenberger, #hg-reviewers, indygreg
Cc: indygreg, durin42, mercurial-devel


More information about the Mercurial-devel mailing list