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

Re: [PATCH 0/2] status: stop holding index.lock while collecting

From
JWJun Wu <quark.zju@gmail.com>
Date
Oct 23, 2026, 19:50 UTC
Message-ID
<20261023195101.1087983-1-quark.zju@gmail.com>
In-Reply-To
<xmqqik2s5kt3.fsf@gitster.g>
Hi Junio,
On Fri, 23 Oct 2026 11:33:12 -0700, Junio C Hamano wrote:
Show 11 quoted lines
> Mihai Cosma <mcosma@gmail.com> writes:
>
> > This overlaps with Jun Wu's "Wait for the index lock instead of
> > failing" series, and the two fit together: his makes writers wait for
> > the lock, this makes status hold it rarely and briefly. They only
> > conflict on the one lock call in cmd_status(), which his series renames
> > to repo_try_hold_locked_index(). I'm happy to rebase onto it. On top of
> > his v2, the slowest "git add" in the clean case below went from 1020 ms
> > (one failure at his 1s timeout) to 160 ms.
>
> Perhaps you two can work together and send a single consolidated series?
I think the two series are relatively independent:
- Mine changed non-status commands.
- Mihai's mainly changed "status".
Neither series replaces any part of the other.
There are multiple subtle pre-existing race conditions involved:
- I fixed some read/lock wrong order races.
- Mihai fixed a update_index_if_able() race when skipHash=true.
  (This alone could go to maint.)

My preference is to keep them separate to bound the mental complexity needed to understand related issues. The actual textual conflict is just one function name.

-Jun
Previous: Junio C Hamano
Message 5 of 5 in “status: stop holding index.lock while collecting”
  1. 0/2 status: stop holding index.lock while collectingMihai Cosma, Oct 22, 2026
  2. 1/2 read-cache: verify skipHash index by stat dataMihai Cosma, Oct 22, 2026
  3. 2/2 status: lock the index only to write itMihai Cosma, Oct 22, 2026
  4. Junio C HamanoOct 23, 2026
  5. Jun WuOct 23, 2026

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.