Re: suspected race between packing and fetch (single case study)
- From
yoh@onerussian.com <yoh@onerussian.com>
- Date
- Jan 12, 2021, 17:46 UTC
- Message-ID
- <X/3gbjQs7+wHoJpb@lena.dartmouth.edu>
- In-Reply-To
- <X/ymFuUPn2POWA/p@nand.local>
On Mon, 11 Jan 2021, Taylor Blau wrote:
> ++ > +*NOTE*: this operation can race with concurrent modification to the > +source repository, similar to running `cp -r src dst` while modifying > +`src`.
Couldn't `gc` be triggered by git in seemingly read-only operations, thus possibly ruining the analogy with `cp` while doing `rm` (explicit intent to modify)?
Moreover, situation is also a bit different since a sane user script would not place `rm` into background to keep operating on original source right before doing `cp` -- and that is what is happening here:
`git` operation is presumably complete (but leaves `gc` running in the background) and script advances to the next step only to run into a race condition with that preceding `git` command which apparently triggered `gc`. Should then any script which operates on local `git` repositories not to forget to add -c gc.autodetach=0 for every git invocation which might be potentially effected?
Cheers,
-- Yaroslav O. Halchenko Center for Open Neuroscience http://centerforopenneuroscience.org Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755 WWW: http://www.linkedin.com/in/yarik