From: Patrick Steinhardt <ps@pks.im>
To: Justin Tobler <jltobler@gmail.com>
Cc: git@vger.kernel.org, likui@oschina.cn
Subject: Re: [PATCH] builtin/fetch: avoid aborting closed reference transaction
Date: Mon, 24 Mar 2025 16:25:40 +0100 [thread overview]
Message-ID: <Z-F5dJXq0uCxpqoL@pks.im> (raw)
In-Reply-To: <vmmr2cwiyd2iz7c3yfyzym3l2aono7lsx7wig3pwmw33gst37h@orjtfygfyow4>
On Mon, Mar 24, 2025 at 10:10:44AM -0500, Justin Tobler wrote:
> On 25/03/24 11:40AM, Patrick Steinhardt wrote:
> > That wouldn't help with the fixed bug though, which is that we call
> > abort after a failed commit even though the transaction was already
> > aborted.
>
> I wonder if it would make sense to stop closing the transaction on a
> failed commit and require the caller to abort it. This would allow error
> handling to unconditionally abort the transaction during cleanup.
I think it might still feel somewhat awkward because now every caller
would have to both abort and free the transaction when the commit fails.
An alternative could be to make abortion idempotent, where aborting an
already aborted transaction is fine. But I'm not too sure whether that
would significantly improve things.
I don't really have a gut feeling here what the best route to go would
be.
Patrick
prev parent reply other threads:[~2025-03-24 15:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <37599b30-dee2-4a36-8129-04fe5f6b633e.likui@oschina.cn>
2025-03-20 8:36 ` `git fetch origin --prune --atomic` core dumped 李葵
2025-03-20 16:10 ` Justin Tobler
2025-03-21 0:44 ` [PATCH] builtin/fetch: avoid aborting closed reference transaction Justin Tobler
2025-03-24 10:40 ` Patrick Steinhardt
2025-03-24 15:10 ` Justin Tobler
2025-03-24 15:25 ` Patrick Steinhardt [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=Z-F5dJXq0uCxpqoL@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=jltobler@gmail.com \
--cc=likui@oschina.cn \
/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).