git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Handling racy entries in the v5 format [Re: [GSoC] Designing a faster index format - Progress report week 7]

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 6, 2012, 17:31 UTC
Message-ID
<7vk3zkmjo1.fsf@alter.siamese.dyndns.org>
In-Reply-To
<87aa0gbwon.fsf@thomas.inf.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
Show 8 quoted lines
> (Michael, we have adapted it somewhat this since you left IRC.)
>
>   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.

Is this even workable? I found that "open, read a byte, write it back in place, then stat" was not giving useful timestamp and that was the reason the original racy-git code chose not to do this.

You may be able to do "open, read a byte, write it back in place, fsync, close and then stat", but doing so while holding that file also as a lock feels somewhat dirty...

Previous: Johannes Sixt
Message 4 of 4 in “[GSoC] Designing a faster index format - Progress report week 7”
  1. Thomas GummererJun 4, 2012
  2. Handling racy entries in the v5 format [Re: [GSoC] Designing a faster index format - Progress report week 7]Thomas Rast, Jun 6, 2012
  3. Johannes SixtJun 6, 2012
  4. Junio C HamanoJun 6, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.