git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: James Melvin <jmelvin@codeaurora.org>
Cc: git@vger.kernel.org, nasserg@codeaurora.org,
	mfick@codeaurora.org, peff@peff.net, sbeller@google.com
Subject: Re: [PATCH v2] repack: Add option to preserve and prune old pack files
Date: Fri, 10 Mar 2017 15:43:43 -0800	[thread overview]
Message-ID: <xmqqmvcswvdc.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170310220020.2666-1-jmelvin@codeaurora.org> (James Melvin's message of "Fri, 10 Mar 2017 15:00:20 -0700")

James Melvin <jmelvin@codeaurora.org> writes:

> The new --preserve-and-prune option renames old pack files
> instead of deleting them after repacking and prunes previously
> preserved pack files.
>
> This option is designed to prevent stale file handle exceptions
> during git operations which can happen on users of NFS repos when
> repacking is done on them. The strategy is to preserve old pack files
> around until the next repack with the hopes that they will become
> unreferenced by then and not cause any exceptions to running processes
> when they are finally deleted (pruned).

This certainly is simpler than the previous one, but if you run

	git repack --preserve-and-prune 
	sleep for N minutes
	git repack --preserve-and-prune 

the second "repack" will drop the obsoleted packs that were
preserved by the first one no matter how short the value of N is,
no?

I suspect that users would be more comfortable with something based
on expiration timestamp that gives them a guaranteed grace period,
e.g. "--preserve-expire=8.hours", like how we expire reflog entries
and loose objects.

Perhaps builtin/prune.c can be a source of inspiration?

  reply	other threads:[~2017-03-10 23:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-10 22:00 [PATCH v2] repack: Add option to preserve and prune old pack files James Melvin
2017-03-10 23:43 ` Junio C Hamano [this message]
2017-03-12 12:24   ` Jeff King
2017-03-12 18:03     ` Junio C Hamano
2017-03-13 16:39       ` Martin Fick
2017-03-11 12:38 ` Ævar Arnfjörð Bjarmason

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=xmqqmvcswvdc.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jmelvin@codeaurora.org \
    --cc=mfick@codeaurora.org \
    --cc=nasserg@codeaurora.org \
    --cc=peff@peff.net \
    --cc=sbeller@google.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).