git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/8] pack-objects: produce a stable pack when --skip is given
Date: Fri, 05 Feb 2016 10:43:57 -0800	[thread overview]
Message-ID: <xmqq1t8rdmky.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1454662677-15137-3-git-send-email-pclouds@gmail.com> ("Nguyễn	Thái Ngọc Duy"'s message of "Fri, 5 Feb 2016 15:57:51 +0700")

Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:

> diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
> index 417c830..c58a9cb 100644
> --- a/builtin/pack-objects.c
> +++ b/builtin/pack-objects.c
> @@ -2709,6 +2709,11 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
>  			if (get_oid_hex(skip_hash_hex, &skip_hash))
>  				die(_("%s is not SHA-1"), skip_hash_hex);
>  		}
> +
> +		/*
> +		 * Parallel delta search can't produce stable packs.
> +		 */
> +		delta_search_threads = 1;
>  	}
>  
>  	argv_array_push(&rp, "pack-objects");

A multi-threaded packing is _one_ source of regenerating the same
pack for the same set of objects, but we shouldn't be tying our
hands by promising it will forever be the _only_ source of it by
doing things like this.  We may want to dynamically tweak the
packing behaviour depending on the load of the minute and such for
example.

This is an indication that the approach this series takes is taking
us in a wrong direction.

I think a more sensible approach for "resuming" is to attack cloning
first.  Take a reasonable baseline snapshot periodically (depending
on the activity level of the project, the interval may span between
12 hours to 2 weeks and you would want to make it configurable) to
create a bundle, teach "clone" to check the bundle first and perform
a resumable and bulk transfer for the stable part of the history
(e.g. up to the latest tag or a branch that does not rewind, the set
of refs to use as the stable anchors you would want to make
configurable), and then fill the gap between that baseline snapshot
and up-to-date state by doing another round of "git fetch" and then
you'd have solved the most serious problem already.

  reply	other threads:[~2016-02-05 18:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05  8:57 [PATCH 0/8] Resumable clone revisited, proof of concept Nguyễn Thái Ngọc Duy
2016-02-05  8:57 ` [PATCH 1/8] pack-objects: add --skip and --skip-hash Nguyễn Thái Ngọc Duy
2016-02-05  9:20   ` Johannes Schindelin
2016-02-05  8:57 ` [PATCH 2/8] pack-objects: produce a stable pack when --skip is given Nguyễn Thái Ngọc Duy
2016-02-05 18:43   ` Junio C Hamano [this message]
2016-02-05 23:25     ` Duy Nguyen
2016-02-06  0:48       ` Junio C Hamano
2016-02-08  5:23         ` Duy Nguyen
2016-02-05  8:57 ` [PATCH 3/8] index-pack: add --append-pack=<path> Nguyễn Thái Ngọc Duy
2016-02-05  8:57 ` [PATCH 4/8] upload-pack: new capability to pass --skip* to pack-objects Nguyễn Thái Ngọc Duy
2016-02-05  9:18   ` Johannes Schindelin
2016-02-05  8:57 ` [PATCH 5/8] fetch-pack.c: send "skip" line " Nguyễn Thái Ngọc Duy
2016-02-07  8:57   ` Eric Sunshine
2016-02-05  8:57 ` [PATCH 6/8] fetch: add --resume-pack=<path> Nguyễn Thái Ngọc Duy
2016-02-05  8:57 ` [PATCH 7/8] index-pack: --append-pack implies --strict Nguyễn Thái Ngọc Duy
2016-02-07  9:02   ` Eric Sunshine
2016-02-05  8:57 ` [PATCH 8/8] one ugly test to verify basic functionality Nguyễn Thái Ngọc Duy
2016-02-05 11:57   ` Elia Pinto
2016-02-05 13:02     ` Duy Nguyen
2016-02-05 13:33       ` Elia Pinto
2016-02-05 13:20     ` Johannes Schindelin
2016-02-05 13:38       ` Elia Pinto

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq1t8rdmky.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).