All of lore.kernel.org
 help / color / mirror / Atom feed
From: Justin Tobler <jltobler@gmail.com>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: "Patrick Steinhardt" <ps@pks.im>,
	git@vger.kernel.org, gitster@pobox.com,
	"Mitja Bezenšek" <mitja.bezensek@login5.org>
Subject: Re: [PATCH v3] fetch: commit references fetched before backfilling tags
Date: Wed, 21 Oct 2026 08:59:13 -0500	[thread overview]
Message-ID: <atjAS1qQ7HyDYbxh@denethor> (raw)
In-Reply-To: <CAOLa=ZQ_sgz9e4JFWj61HNnKXx+pTvTYhENbbtRu+ATUbXxS9g@mail.gmail.com>

On 26/10/21 06:01AM, Karthik Nayak wrote:
> Patrick Steinhardt <ps@pks.im> writes:
> > On Tue, Oct 20, 2026 at 06:05:22PM -0500, Justin Tobler wrote:
> >> Naively, I think it would be nice if it were possible supplement the
> >> backfill fetch "haves" with the non-committed references in the pending
> >> transaction directly. That would avoid having to commit the references
> >> in the middle and probably also fix it for atomic fetches too, but I'm
> >> uncertain if that would be a simple or reasonable thing to do.
> >
> > Hmm, I think that's a sensible idea. We should know about the ref
> > updates we have already scheduled into the transaction, so in theory we
> > could use their new object IDs in the negotiation. If that's possible it
> > would definitely be a much better fix.
>
> I'm a bit wary of going down ad we'd be exposing un-committed references
> which could fail as 'haves' to the server. This doesn't seem to be
> conceptually correct as we now expect GC to not clear the objects needed
> by relying on the .keep lock instead of durable references.

I'm not quite sure I follow why this would be conceptually problematic.
Should it really matter in this particular scenario whether the tips the
client advertises are committed or not? The required objects should
already be present in the repository from the initial fetch.

Regarding the continued use of ".keep" lockfiles to prevent newly
fetched packfiles from being GC'd, that still sounds reasonable to me.
It is expected that the ".keep" lockfiles remain in place until the
reference transaction is committed any way. To me, conceptually all we
are doing is allowing the current inflight state of the transaction to
be used to affect another operation being performed within the very same
transaction.

> But seems like we have negotiation_include_tips in the transport
> structure which seems like the right fit?

At a quick glance, this seems like it could be a good way for the client
to advertise to the sever the tips of the uncommitted references it has.

-Justin

  reply	other threads:[~2026-10-21 13:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 22:10 [PATCH] fetch: commit references fetched before backfilling tags Karthik Nayak
2026-10-09 11:26 ` Patrick Steinhardt
2026-10-09 16:51   ` Justin Tobler
2026-10-09 22:16     ` Karthik Nayak
2026-10-09 22:31   ` Karthik Nayak
2026-10-12 15:29 ` [PATCH v2] " Karthik Nayak
2026-10-12 19:55   ` Junio C Hamano
2026-10-15 10:31     ` Karthik Nayak
2026-10-15 21:24 ` [PATCH v3] " Karthik Nayak
2026-10-20 23:05   ` Justin Tobler
2026-10-21  6:39     ` Patrick Steinhardt
2026-10-21 10:01       ` Karthik Nayak
2026-10-21 13:59         ` Justin Tobler [this message]
2026-10-21 10:05     ` Karthik Nayak

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=atjAS1qQ7HyDYbxh@denethor \
    --to=jltobler@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=karthik.188@gmail.com \
    --cc=mitja.bezensek@login5.org \
    --cc=ps@pks.im \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.