git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Calvin Wan <calvinwan@google.com>
Cc: git@vger.kernel.org,  steamdon@google.com,  emrass@google.com,
	ps@pks.im,  me@ttaylorr.com,  stolee@gmail.com
Subject: Re: [RFC PATCH 0/1] maintenance: separate parallelism safe and unsafe tasks
Date: Mon, 11 Nov 2024 13:50:12 +0900	[thread overview]
Message-ID: <xmqqzfm6fk6z.fsf@gitster.g> (raw)
In-Reply-To: <20241108173112.1240584-1-calvinwan@google.com> (Calvin Wan's message of "Fri, 8 Nov 2024 17:31:11 +0000")

Calvin Wan <calvinwan@google.com> writes:

> However, this is not the case as discovered earlier[1] -- certain
> maintenance and gc tasks are not safe to run in parallel with other
> commands. The consequences of such are that scripts with commands that
> trigger maintenance/gc can race and crash.
>
> Users can also run into
> unexpected errors from porcelain commands that touch common files such
> as HEAD.lock, unaware that a background maintenance/gc task is the one
> holding the lock.

The symptom looks more like a controlled refusal of execution than a
crash.

> As Patrick points out[2], the two unsafe commands are `git reflog expire
> --all`, invoked by gc, and `git pack-refs --all --prune`, invoked by
> maintenance. We can create two buckets for subtasks -- one for async
> safe tasks and one for async unsafe tasks.

I am not sure if they can be partitioned into black and white, but
let's see.

> This series is in RFC to see if the general direction of the patch is
> going in the right direction. I left a couple of WIPs in the first patch
> documenting what still needs to be done if the direction is palatable.


  parent reply	other threads:[~2024-11-11  4:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 17:31 [RFC PATCH 0/1] maintenance: separate parallelism safe and unsafe tasks Calvin Wan
2024-11-08 17:31 ` [RFC PATCH 1/1] " Calvin Wan
2024-11-11  7:07   ` Patrick Steinhardt
2024-11-11 18:06     ` Calvin Wan
2024-11-12  6:28       ` Patrick Steinhardt
2024-11-15 20:13         ` Calvin Wan
2024-11-18  1:32           ` Junio C Hamano
2024-11-18  6:58           ` Patrick Steinhardt
2024-11-11  8:24   ` Junio C Hamano
2024-11-11  9:14   ` Junio C Hamano
2024-11-11 18:12     ` Calvin Wan
2024-11-11  4:50 ` Junio C Hamano [this message]
2024-11-11 18:39   ` [RFC PATCH 0/1] " Calvin Wan

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=xmqqzfm6fk6z.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=calvinwan@google.com \
    --cc=emrass@google.com \
    --cc=git@vger.kernel.org \
    --cc=me@ttaylorr.com \
    --cc=ps@pks.im \
    --cc=steamdon@google.com \
    --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;
as well as URLs for NNTP newsgroup(s).