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

Re: [PATCH 1/2] repository: add core.indexLockTimeout

From
Ben Knoble <ben.knoble@gmail.com>
Date
Oct 19, 2026, 16:23 UTC
Message-ID
<F02EB9EC-E157-49D2-BF27-81DFF625D884@gmail.com>
In-Reply-To
<20261014221233.1694344-1-quark.zju@gmail.com>
Show 18 quoted lines
> Le 14 oct. 2026 à 18:13, Jun Wu <quark.zju@gmail.com> a écrit :
> 
> On Tue, 13 Oct 2026 15:05:52 -0700, Junio C Hamano wrote:
>>> Default timeout is 1s, effective but not too long to avoid breaking potential
>>> user expectation (e.g. "an index.lock error means I should check whether a
>>> commit message editor is open somewhere"). Tests that are slowed down by the
>>> default timeout now set the timeout to 0.
> 
>> I am not sure if the change is making the right trade-off between
>> background tasks and end-user action that expects immediate
>> response.
> 
> It seems the trade-off is between command success rate and command duration.
> 
> I suspect that end-users want commands to work (not fail) first, performance
> comes next. In my experience, high command failure rate escalates to oncall
> incidents, occasional slightly slower commands often get unnoticed unless we
> look at the metrics explicitly.

I’ve given it some more thought, and acknowledging that I’m unaffected by the bug being fixed, I would add:

It seems like working flows have to become more complex to handle these broken flows. And that leaves a sour taste for me. Folks do notice hangups at a shell that is typically quick to respond.

But, as I said, I’ll bow out since it seems like there’s some support from more experienced folks for this direction.

Previous: Jun WuNext: Jun Wu
Message 8 of 20 in “Add a way to wait for index lock”
  1. 0/2 Add a way to wait for index lockJun Wu, Oct 13, 2026
  2. 1/2 repository: add core.indexLockTimeoutJun Wu, Oct 13, 2026
  3. D. Ben KnobleOct 13, 2026
  4. Jun WuOct 14, 2026
  5. D. Ben KnobleOct 14, 2026
  6. Junio C HamanoOct 13, 2026
  7. Jun WuOct 14, 2026
  8. Ben KnobleOct 19, 2026
  9. 2/2 commit: lock index before readingJun Wu, Oct 13, 2026
  10. Jeff KingOct 14, 2026
  11. Jun WuOct 15, 2026
  12. Junio C HamanoOct 13, 2026
  13. Jun WuOct 14, 2026
  14. Jeff KingOct 14, 2026
  15. 0/4 Wait for the index lock instead of failingJun Wu, Oct 17, 2026
  16. 1/4 repository: add repo_try_hold_locked_index()Jun Wu, Oct 17, 2026
  17. 2/4 repository: add core.indexLockTimeoutJun Wu, Oct 17, 2026
  18. 3/4 commit: fix write raceJun Wu, Oct 17, 2026
  19. 4/4 reset: fix write raceJun Wu, Oct 17, 2026
  20. Mihai CosmaOct 22, 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.