Git development
 help / color / mirror / Atom feed
From: Jun Wu <quark.zju@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Mihai Cosma <mcosma@gmail.com>,
	git@vger.kernel.org, peff@peff.net, stolee@gmail.com
Subject: Re: [PATCH 0/2] status: stop holding index.lock while collecting
Date: Fri, 23 Oct 2026 12:50:55 -0700	[thread overview]
Message-ID: <20261023195101.1087983-1-quark.zju@gmail.com> (raw)
In-Reply-To: <xmqqik2s5kt3.fsf@gitster.g>

Hi Junio,

On Fri, 23 Oct 2026 11:33:12 -0700, Junio C Hamano wrote:
> 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

      reply	other threads:[~2026-10-23 19:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22 18:44 [PATCH 0/2] status: stop holding index.lock while collecting Mihai Cosma
2026-10-22 18:44 ` [PATCH 1/2] read-cache: verify skipHash index by stat data Mihai Cosma
2026-10-22 18:44 ` [PATCH 2/2] status: lock the index only to write it Mihai Cosma
2026-10-23 18:33 ` [PATCH 0/2] status: stop holding index.lock while collecting Junio C Hamano
2026-10-23 19:50   ` Jun Wu [this message]

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=20261023195101.1087983-1-quark.zju@gmail.com \
    --to=quark.zju@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mcosma@gmail.com \
    --cc=peff@peff.net \
    --cc=stolee@gmail.com \
    /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