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

Re: [PATCH 0/2] Fix locking issues with git fetch --multiple --jobs=<n> and fetch.writeCommitGraph

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 6, 2019, 12:05 UTC
Message-ID
<nycvar.QRO.7.76.6.1911061305060.46@tvgsbejvaqbjf.bet>
In-Reply-To
<20191104195928.GC20900@sigill.intra.peff.net>
Hi Peff,
On Mon, 4 Nov 2019, Jeff King wrote:
Show 21 quoted lines
> On Sun, Nov 03, 2019 at 12:21:55AM +0000, Johannes Schindelin via GitGitGadget wrote:
>
> > The git fetch command recently learned to extend the --jobs=<n> option to
> > cover the --multiple mode: it will run multiple fetches in parallel.
> >
> > Together with the recent support to write commit-graphs automatically after
> > each fetch by setting fetch.writeCommitGraph, this led to frequent issues
> > where the commit-graph-chain.lock file could not be created because a
> > parallel job had already created it.
> >
> > This pair of patches first introduces the command-line option
> > --write-commit-graph (together with the --no-* variant) and then uses it to
> > avoid writing the commit-graph until all fetch jobs are complete.
>
> Thanks, the whole thing looks clearly explained and the patches
> themselves look good. And having "--[no-]write-commit-graph" is a good
> thing even independent of the problem you're fixing.
>
> I wondered if it was worth having a test in the second patch, but I
> think it would be inherently racy. So it's probably not worth the
> trouble.

Yes, I gave testing a great deal of thought, and I failed at coming up with any way to automate it.

Thanks, Dscho

Previous: Junio C Hamano
Message 6 of 6 in “Fix locking issues with git fetch --multiple --jobs=<n> and fetch.writeCommitGraph”
  1. 0/2 Fix locking issues with git fetch --multiple --jobs=<n> and fetch.writeCommitGraphJohannes Schindelin via GitGitGadget, Nov 3, 2019
  2. 1/2 fetch: add the command-line option `--write-commit-graph`Johannes Schindelin via GitGitGadget, Nov 3, 2019
  3. 2/2 fetch: avoid locking issues between fetch.jobs/fetch.writeCommitGraphJohannes Schindelin via GitGitGadget, Nov 3, 2019
  4. Jeff KingNov 4, 2019
  5. Junio C HamanoNov 6, 2019
  6. Johannes SchindelinNov 6, 2019

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.