From: Matt McCutchen <matt@mattmccutchen.net>
To: Jeff King <peff@peff.net>
Cc: git <git@vger.kernel.org>
Subject: Re: Protecting old temporary objects being reused from concurrent "git gc"?
Date: Tue, 15 Nov 2016 12:33:04 -0500 [thread overview]
Message-ID: <1479231184.2406.88.camel@mattmccutchen.net> (raw)
In-Reply-To: <20161115170634.ichqrqbhmpv2dsiw@sigill.intra.peff.net>
[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]
On Tue, 2016-11-15 at 12:06 -0500, Jeff King wrote:
> - when an object write is optimized out because we already have the
> object, git will update the mtime on the file (loose object or
> packfile) to freshen it
FWIW, I am not seeing this happen when I do "git read-tree --prefix"
followed by "git write-tree" using the current master (3ab2281). See
the attached test script.
> If you have long-running data (like, a temporary index file that might
> literally sit around for days or weeks) I think that is a potential
> problem. And the solution is probably to use refs in some way to point
> to your objects.
Agreed. This is not my current scenario.
> If you're worried about a short-term operation where
> somebody happens to run git-gc concurrently, I agree it's a possible
> problem, but I suspect something you can ignore in practice.
>
> For the most part, a lot of the client-side git tools assume that one
> operation is happening at a time in the repository. And I think that
> largely holds for a developer working on a single clone, and things just
> work in practice.
>
> Auto-gc makes that a little sketchier, but historically does not seem to
> have really caused problems in practice.
OK. I'll write a patch to add a summary of this information to the
git-gc man page.
Matt
[-- Attachment #2: test-git-read-tree-write-tree-touch-object.sh --]
[-- Type: application/x-shellscript, Size: 502 bytes --]
next prev parent reply other threads:[~2016-11-15 17:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-15 14:13 Protecting old temporary objects being reused from concurrent "git gc"? Matt McCutchen
2016-11-15 17:06 ` Jeff King
2016-11-15 17:33 ` Matt McCutchen [this message]
2016-11-15 17:40 ` Jeff King
2016-11-15 19:08 ` [PATCH] git-gc.txt: expand discussion of races with other processes Matt McCutchen
2016-11-15 19:12 ` Protecting old temporary objects being reused from concurrent "git gc"? Matt McCutchen
2016-11-15 20:01 ` Junio C Hamano
2016-11-16 8:07 ` Jeff King
2016-11-16 18:18 ` Junio C Hamano
2016-11-16 18:58 ` Junio C Hamano
2016-11-17 1:04 ` Jeff King
2016-11-17 1:35 ` Re* " Junio C Hamano
2016-11-17 1:43 ` Jeff King
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=1479231184.2406.88.camel@mattmccutchen.net \
--to=matt@mattmccutchen.net \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).