git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Tan <jonathantanmy@google.com>
To: git@vger.kernel.org
Cc: Jonathan Tan <jonathantanmy@google.com>
Subject: [PATCH 0/2] When fetching, warn if in commit graph but not obj db
Date: Tue, 29 Oct 2024 14:11:03 -0700	[thread overview]
Message-ID: <cover.1730235646.git.jonathantanmy@google.com> (raw)
In-Reply-To: <20241003223546.1935471-1-emilyshaffer@google.com>

I mentioned previously [1] the possibility of not running maintenance
steps (commit graph writing and "git maintenance") if no packs were
fetched, but looking at things again, I think that we shouldn't do
that - in particular, if I ran "git fetch --refetch", I would fully
expect the objects to be repacked, even if Git wasn't able to detect
conclusively whether a pack was transmitted.

So I went back to my original idea of detecting when an object is
missing. In trying to balance the concerns of both doing something as
reasonable as possible in such a repo corruption case, and not slowing
down and/or unnecessarily complicating the main code flow, I decided
to detect when an object is present in the commit graph but not in the
object DB, and to limit this detection for objects specified in the
fetch refspec.

Upon detection, we can't fix it due to reasons mentioned in the commit
message, so I decided to print a warning. An alternate option is to make
it a fatal error (instead of a warning) if an object is detected to be
in the commit graph but not the object DB. I haven't thought through the
ramifications of that, though.

[1] https://lore.kernel.org/git/20241028225504.4151804-1-jonathantanmy@google.com/

Jonathan Tan (2):
  Revert "fetch-pack: add a deref_without_lazy_fetch_extended()"
  fetch-pack: warn if in commit graph but not obj db

 fetch-pack.c | 45 +++++++++++++++++++++++++--------------------
 object.h     |  2 +-
 2 files changed, 26 insertions(+), 21 deletions(-)

-- 
2.47.0.163.g1226f6d8fa-goog


  parent reply	other threads:[~2024-10-29 21:11 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-03 22:35 [RFC PATCH] promisor-remote: always JIT fetch with --refetch Emily Shaffer
2024-10-06 22:43 ` Junio C Hamano
2024-10-07  0:21   ` Robert Coup
2024-10-07  0:37     ` Junio C Hamano
2024-10-11 16:40   ` Emily Shaffer
2024-10-11 17:54     ` Junio C Hamano
2024-10-23  0:28 ` [PATCH v2] fetch-pack: don't mark COMPLETE unless we have the full object Emily Shaffer
2024-10-23 18:53   ` Emily Shaffer
2024-10-23 20:11   ` Taylor Blau
2024-10-28 22:55     ` Jonathan Tan
2024-10-29 21:11 ` Jonathan Tan [this message]
2024-10-29 21:11   ` [PATCH 1/2] Revert "fetch-pack: add a deref_without_lazy_fetch_extended()" Jonathan Tan
2024-10-30 21:22     ` Josh Steadmon
2024-10-29 21:11   ` [PATCH 2/2] fetch-pack: warn if in commit graph but not obj db Jonathan Tan
2024-10-30 21:22     ` Josh Steadmon
2024-10-31 21:23       ` Jonathan Tan
2024-10-31 20:59     ` Taylor Blau
2024-10-31 21:43       ` Jonathan Tan
2024-11-01 14:33         ` Taylor Blau
2024-11-01 17:33           ` Jonathan Tan
2024-10-30 21:22   ` [PATCH 0/2] When fetching, " Josh Steadmon
2024-10-31 21:18   ` [PATCH v2 0/2] When fetching, die " Jonathan Tan
2024-10-31 21:19     ` [PATCH v2 1/2] Revert "fetch-pack: add a deref_without_lazy_fetch_extended()" Jonathan Tan
2024-10-31 21:19     ` [PATCH v2 2/2] fetch-pack: warn if in commit graph but not obj db Jonathan Tan
2024-11-01  2:22       ` Junio C Hamano
2024-11-01  4:25         ` Junio C Hamano
2024-11-01  8:59           ` [External] " Han Xin
2024-11-01 17:46             ` Jonathan Tan
2024-11-01 17:40           ` Jonathan Tan
2024-11-02  2:08             ` Junio C Hamano
2024-11-01 17:36         ` Jonathan Tan
2024-11-01 15:18       ` Taylor Blau
2024-11-01 17:49         ` Jonathan Tan
2024-10-31 22:33     ` [PATCH v2 0/2] When fetching, die " Josh Steadmon
2024-11-05 19:24   ` [PATCH v3 " Jonathan Tan
2024-11-05 19:24     ` [PATCH v3 1/2] Revert "fetch-pack: add a deref_without_lazy_fetch_extended()" Jonathan Tan
2024-11-05 19:24     ` [PATCH v3 2/2] fetch-pack: die if in commit graph but not obj db Jonathan Tan
2024-11-06  3:12     ` [PATCH v3 0/2] When fetching, " Junio C Hamano

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=cover.1730235646.git.jonathantanmy@google.com \
    --to=jonathantanmy@google.com \
    --cc=git@vger.kernel.org \
    /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).