From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Duy Nguyen <pclouds@gmail.com>,
Kevin Wern <kevin.m.wern@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Resumable clone
Date: Sun, 06 Mar 2016 19:55:23 -0800 [thread overview]
Message-ID: <xmqq37s3rlg4.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: alpine.DEB.2.20.1603060831570.3152@virtualbox
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> First of all: my main gripe with the discussed approach is that it uses
> bundles. I know, I introduced bundles, but they just seem too klunky and
> too static for the resumable clone feature.
We should make the mechanism extensible so that we can later support
multiple "alternate resource" formats, and "bundle" could be one of
the options, my current thinking is that the initial version should
use just a bare packfile to bootstramp, not a bundle.
The format being "static" is both a feature and a practical
compromise. It is a feature to allow clone traffic, which is a
significant portion of the whole traffic to hosting sites, diverted
off of the core server network for a busy hosting site, saving both
networking and CPU cost. And that benefit will be felt even if the
client has a good enough connection to the server that it does not
have to worry about resuming. It is a practical compromise that the
mechanism will not be extensible for helping incremental fetch but I
heard that the server side statistics tells us that there aren't
many "duplicate incremental fetch" requests (i.e. many clients
having the same set of "have"s so that the server side can prepare,
serve, and cache the same incremental pack, which can be served on a
resumable transport, to help resuming clients by supporting
partial/range requests), I do not think it is practical to try to
use the same mechanism to help incremental and clone traffic. One
size would not fit both here.
I think a better approach to help incremental fetches is along the
line of what was discussed in the discussion with Al Viro and others
the other day. You'd need various building blocks implemented anew,
including:
- A protocol extension to allow the client to tell the server a
list of "not necessarily connected" objects that it has, so that
the server side can exclude them from the set of objects the
traditional "have"-"ack" exchange would determine to be sent when
building a pack.
- A design of deciding what "list of objects" is worth sending to
the server side. The total number of objects in the receiving
end is an obvious upper bound, and it might be sufficient to
send the whole thing as-is, but there may be more efficient way
to determine this set [*1*]
- A way to salvage objects from a truncated pack, as there is no
such tool in core-git.
[Footnote]
*1* Once the traditional "have"-"ack" determines the set of objects
the sender thinks the receiver may not have, we need to figure
out the ones that happen to exist on the receiver end already,
either because they were salvaged from a truncated pack data it
received earlier, or perhaps because they already existed by
fetching from a side branch (e.g. two repositories derived from
the same upstream, updating from Linus's kernel tree by somebody
who regularly interacts with linux-next tree), and exclude them
from the set of objects sent from the sender.
I've long felt that Eppstein's invertible bloom filter might be
a good way to determine efficiently, among the set of objects
the sending and the receiving ends have, which ones are common,
but I didn't look into this deeply myself.
next prev parent reply other threads:[~2016-03-07 3:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-05 9:23 Resumable clone Kevin Wern
2016-03-05 9:40 ` Duy Nguyen
2016-03-05 18:31 ` Junio C Hamano
2016-03-05 18:40 ` Junio C Hamano
2016-03-06 7:59 ` Johannes Schindelin
2016-03-06 8:49 ` Duy Nguyen
2016-03-06 8:52 ` Duy Nguyen
2016-03-06 19:48 ` Junio C Hamano
2016-03-07 3:55 ` Junio C Hamano [this message]
2016-03-08 3:33 ` Kevin Wern
2016-03-08 11:11 ` Duy Nguyen
2016-03-08 17:25 ` Junio C Hamano
2016-03-08 17:07 ` Junio C Hamano
2016-03-09 2:04 ` Kevin Wern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq37s3rlg4.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=kevin.m.wern@gmail.com \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox