From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b1-smtp.messagingengine.com (fout-b1-smtp.messagingengine.com [202.12.124.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BBFB3B42F1 for ; Wed, 24 Jun 2026 09:33:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.144 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782293615; cv=none; b=ZfmJgSsIMh47+tQ5zpxFKfV6fUCJ/EPdQuJvUQv2nUKyF59D25eS7su2WxwgUKDFrMKbL0qZLa/n7GCHDsE5Hw+wRVHyEr91IBmwo/ezOADqN/BAzFAQjs/MmJPkD2RoWvhPFOKZlWOcPQGmEelkYP+aC50uc98A+wyvK8RSNoY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782293615; c=relaxed/simple; bh=vngR6AOIyVXvODJdkQOO2X6pwz+/LhQhXAaewpLWTDw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kObY56e7927WmStwijmiOqjbn8K/7LtW1kjrLofcVgyG3QTqnUp6vbVgJxJejkXupx0xWAkiou5OHYo5QiF7jvjtMMuJC1/kpDT1zsfMLmzZKrD/CCAQGaq+/CNm7O2N7pOj/uoM0Tlp382E7VAWRReRABzPa2rHwcAykXejEeY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=brFoATIp; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=eyj9esdB; arc=none smtp.client-ip=202.12.124.144 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="brFoATIp"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="eyj9esdB" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 3380E1D00120; Wed, 24 Jun 2026 05:33:25 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Wed, 24 Jun 2026 05:33:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1782293605; x=1782380005; bh=e+NPvUEepC gwZ3BKy/8yn7WCpBMprpSJ4ZdAEWHn3QU=; b=brFoATIp1ejVWKN7UfEP2GWtAo crCYDPcfU7P4WdUAxUc4uCVHvue6BDkPVpsaWWRI7dzwZV80ArHGJF3mQ4l0S0uj GOti5c1oorj53JM81svP5YZRjvwx3kROJv/nXI+sUcGBeX2wXDIwmth4LbuVdhlj 64e7u19T9VZByEqb1eyKn/VdhzDMC9ofywIOKUVZ9VukEhB73IGhDsdmeQE6hHKO OX2Mbp34y/ydlSE6qyeUAsXJfpKrOOSbsB7C+bwGD+gFnzqt/MvQHxh0diUhsuJS 86002FLZbNHQVFLoNViIiiIsmhKVuB08g26RNW8HfUdOuoSIHTH9NHDk0CIA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1782293605; x=1782380005; bh=e+NPvUEepCgwZ3BKy/8yn7WCpBMprpS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+J37A X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 24 Jun 2026 05:33:24 -0400 (EDT) Received: by mail (OpenSMTPD) with ESMTPSA id 9641e413 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 24 Jun 2026 09:33:22 +0000 (UTC) Date: Wed, 24 Jun 2026 11:33:12 +0200 From: Patrick Steinhardt To: Junio C Hamano Cc: git@vger.kernel.org Subject: Re: [PATCH 3/3] connected: search promisor objects generically Message-ID: References: <20260622-pks-connected-generic-promisor-checks-v1-0-25eba2698202@pks.im> <20260622-pks-connected-generic-promisor-checks-v1-3-25eba2698202@pks.im> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Jun 22, 2026 at 10:57:10AM -0700, Junio C Hamano wrote: > Patrick Steinhardt writes: [snip] > > - * > > - * Before checking for promisor packs, be sure we have the > > - * latest pack-files loaded into memory. > > */ > > - odb_reprepare(the_repository->objects); > > Hmph? Oh, I think I completely misread this as `odb_alternates_prepare()`, which is something you typically see before loops like this. By using a helper like `odb_for_each_object_ext()` we of course wouldn't have to call that function anymore. But this here is of course different, as this call would also cause us to reload packfiles and loose objects. > > do { > > - struct packed_git *p; > > - > > - repo_for_each_pack(the_repository, p) { > > - if (!p->pack_promisor) > > - continue; > > - if (find_pack_entry_one(oid, p)) > > - goto promisor_pack_found; > > + opts.prefix = oid; > > + > > + err = odb_for_each_object_ext(the_repository->objects, > > + NULL, promised_object_cb, > > + NULL, &opts); > > + if (err < 0) > > + break; > > + if (err > 0) { > > + err = 0; > > + continue; > > } > > So we used to manually iterate and stop when we have a matching pack > entry, but now "stop when we find" is done by promisor_object_cb > callback that returns 1. > > What is the reason why we no longer odb_(re)prepare() upfront before > going into the loop? Would it make us miss a newly added promisor > packs? We will fall back to rev-list for correctness, so it may not > matter, though. So yes, this is a bug. Thanks! Patrick