From: Johannes Sixt <j.sixt@viscovery.net>
To: Thomas Rast <trast@student.ethz.ch>
Cc: Thomas Gummerer <t.gummerer@gmail.com>,
git@vger.kernel.org, gitster@pobox.com, mhagger@alum.mit.edu,
pclouds@gmail.com
Subject: Re: Handling racy entries in the v5 format [Re: [GSoC] Designing a faster index format - Progress report week 7]
Date: Wed, 06 Jun 2012 15:01:02 +0200 [thread overview]
Message-ID: <4FCF548E.8060708@viscovery.net> (raw)
In-Reply-To: <87aa0gbwon.fsf@thomas.inf.ethz.ch>
Am 6/6/2012 11:45, schrieb Thomas Rast:
> Proposed Solution
> -----------------
>
> When writing an entry: check whether ce_mtime >= index.mtime. If so,
> write out ce_mtime=0.
>
> The index.mtime here is a lower bound on the mtime of the new index,
> obtained e.g. by touching the index and then stat()ing it immediately
> before writing out the changed entries.
Portability note: To "touch" on Windows will mean that the file is
modified (at least one byte is written), then closed. Only then the stat
information is reliable. The reason is that the time stamp is only valid
after (the last handle of) the file was closed.
> Note that this is a fundamentally different approach from the one taken
> in v[2-4] indexes. In the old approach, it is the *next* writer's
> responsibility to ensure that all racy entries are either truly clean,
> or smudged (since they will presumably lose their raciness). In the new
> approach, racy entries are immediately smudged and remain so until an
> update.
-- Hannes
next prev parent reply other threads:[~2012-06-06 13:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-04 20:07 [GSoC] Designing a faster index format - Progress report week 7 Thomas Gummerer
2012-06-06 9:45 ` Handling racy entries in the v5 format [Re: [GSoC] Designing a faster index format - Progress report week 7] Thomas Rast
2012-06-06 13:01 ` Johannes Sixt [this message]
2012-06-06 17:31 ` Junio C Hamano
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=4FCF548E.8060708@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mhagger@alum.mit.edu \
--cc=pclouds@gmail.com \
--cc=t.gummerer@gmail.com \
--cc=trast@student.ethz.ch \
/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).