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
Johannes Sixt <j.sixt@viscovery.net>
Date
Jun 6, 2012, 13:01 UTC
Message-ID
<4FCF548E.8060708@viscovery.net>
In-Reply-To
<87aa0gbwon.fsf@thomas.inf.ethz.ch>
Am 6/6/2012 11:45, schrieb Thomas Rast:
Show 9 quoted lines
> 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.

Show 6 quoted lines
> 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
Previous: Thomas RastNext: Junio C Hamano
Message 3 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.