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

Re: [PATCH] builtin/fetch: avoid aborting closed reference transaction

From
Patrick Steinhardt <ps@pks.im>
Date
Mar 24, 2025, 15:25 UTC
Message-ID
<Z-F5dJXq0uCxpqoL@pks.im>
In-Reply-To
<vmmr2cwiyd2iz7c3yfyzym3l2aono7lsx7wig3pwmw33gst37h@orjtfygfyow4>
On Mon, Mar 24, 2025 at 10:10:44AM -0500, Justin Tobler wrote:
Show 8 quoted lines
> 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
Previous: Justin Tobler
Message 6 of 6 in “`git fetch origin --prune --atomic` core dumped”
  1. 李葵Mar 20, 2025
  2. Justin ToblerMar 20, 2025
  3. builtin/fetch: avoid aborting closed reference transactionJustin Tobler, Mar 21, 2025
  4. Patrick SteinhardtMar 24, 2025
  5. Justin ToblerMar 24, 2025
  6. Patrick SteinhardtMar 24, 2025

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.