From: Clemens Buchacher <drizzd@aon.at>
To: Shawn Pearce <spearce@spearce.org>
Cc: Jeff King <peff@peff.net>, Junio C Hamano <gitster@pobox.com>,
Jonathan Nieder <jrnieder@gmail.com>,
netroby <hufeng1987@gmail.com>,
Git Mail List <git@vger.kernel.org>,
Tomas Carnecky <tom@dbservice.com>
Subject: Re: New Feature wanted: Is it possible to let git clone continue last break point?
Date: Fri, 4 Nov 2011 09:56:33 +0100 [thread overview]
Message-ID: <20111104085633.GA13924@ecki> (raw)
In-Reply-To: <CAJo=hJt2kU10r5rq23qgimtW8dmzu-N92vjO_hNBbVVsKSpDmg@mail.gmail.com>
On Wed, Nov 02, 2011 at 09:19:03PM -0700, Shawn Pearce wrote:
>
> [...] But they can use sendfile() on the server they have and get
> a lot of improvement in clone speed due to lower system load,
> plus resumable clone for the relatively stable history part.
Setting aside the system load issue for now, couldn't we simply do
the following?
1. Figure out HAVE's and WANT's [1], based on which an ad-hoc pack
will be made and sent to the client.
2. Cache the information on disk (not the pack but the information
to re-create it), and give the client a 'ticket number' which
corresponds to that ad-hoc pack.
3. Start downloading the packfile
When the connection drops, we can resume like this:
1. Send the previously received 'ticket number', and the amount of
previously received data.
2. Re-generate the pack from the HAVE's and WANT's cached under
'ticket number'. (This may fail if the repo state has changed
such that previously accessible refs are now inaccessible.)
3. Resume download of that pack.
The upside of this approach is that it would work automatically,
without any manual setup by the server admin. All the previously
discussed ideas skip the step where we figure out the HAVE's and
WANT's. And to me that implies that we manually prepare a packfile
somewhere on disk, which contains what the user usually WANT's and
is allowed to have (think per-branch access control). Even if we
disregard access control, wouldn't that at least require the server
to create a "clean" pack which does not contain any objects from
the reflog?
The whole mirror thing could be pursued independently of the resume
capability, and if each git repo is capable of resuming the mirrors
can be plain git clones as well.
Just my 2 cents,
Clemens
next prev parent reply other threads:[~2011-11-04 8:56 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAEZo+gfKVY-YgMjd=bEYzRV4-460kqDik-yVcQ9Xs=DoCZOMDg@mail.gmail.com>
2011-10-31 2:28 ` New Feature wanted: Is it possible to let git clone continue last break point? netroby
2011-10-31 4:00 ` Tay Ray Chuan
2011-10-31 9:07 ` Jonathan Nieder
2011-10-31 9:16 ` netroby
2011-11-02 22:06 ` Jeff King
2011-11-02 22:41 ` Junio C Hamano
2011-11-02 23:27 ` Jeff King
2011-11-03 0:06 ` Shawn Pearce
2011-11-03 2:42 ` Jeff King
2011-11-03 4:19 ` Shawn Pearce
2011-11-04 8:56 ` Clemens Buchacher [this message]
2011-11-04 9:35 ` Johannes Sixt
2011-11-04 14:22 ` Shawn Pearce
2011-11-04 15:55 ` Jakub Narebski
2011-11-04 16:05 ` Nguyen Thai Ngoc Duy
2011-11-05 10:00 ` Clemens Buchacher
2011-10-31 9:14 ` Jakub Narebski
2011-10-31 12:49 ` Michael Schubert
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=20111104085633.GA13924@ecki \
--to=drizzd@aon.at \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=hufeng1987@gmail.com \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
--cc=spearce@spearce.org \
--cc=tom@dbservice.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;
as well as URLs for NNTP newsgroup(s).