From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (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 F1BD0371899 for ; Tue, 7 Jul 2026 15:24:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.158 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783437890; cv=none; b=TESoW4f6Wr2aIW1boLyHQ111B39vezNhTKzZ2c1MQ6xPiZXQIwtZEuVeVLi4urOdkKXlD5DjnmR0v9fBbmju3PtpXA0S9Q7igPzxKT+vZYK/lzyyhpf2775TA8O//V65hkgixeCHyqaYKnq6xpVpKmIb59ROyMu4TlIRXehGrnE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783437890; c=relaxed/simple; bh=xBnUaleAtVWveqVmeSp7lLGB274f7/5XDLT+tFLp1RE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qfr48urY/7MakTqFbQUGzyurtN5tmUPOspniiBYYAojL7WFkUgDlSI3evlDHwpBp11IEsOjIS7hdVYrO6usSosA6wDS/RaE+vkOf1eCUJukFKw0yLTUIVAr911/98nqWiZUK3JkwDi7aPVKGnPpsBusFWykDbQc34N2fBM+OfSk= 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=JBQOOtkE; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=hW9e46Ni; arc=none smtp.client-ip=103.168.172.158 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="JBQOOtkE"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="hW9e46Ni" Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id 4F9CE1400134; Tue, 7 Jul 2026 11:24:48 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Tue, 07 Jul 2026 11:24:48 -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=fm2; t=1783437888; x=1783524288; bh=MuvH72CPMg hh4np1Z9/jXKMwLtVZsQGj53CSmEG3s4s=; b=JBQOOtkE6f1GojI9YimQ+PUbx9 MusFYoGbxflpk3Jyycy/n9fNiKKxouwLMNHHdO/DUlCDszlzftVdTLYDf0g59Ttp 5mzUhlRhvCJ8xip4DOHy19dDirHYIUJAhkJry7tlRqN9KIYa5BShPCTYhjky82bt raL3PiHIQ5TaQukcNPE78blCBjf2EYwZrlriLntlfM47TnRZKcdXmUHDAs9V/siw 8+z9SIjewlJcY+BI4sVyLFu4VMor7nAFqSh0pWIu8qwXPqm6X1CdEFURvlCdqOk6 HXxBJjULqMfe6gyUm+YzQeo69DYpf9VL3Rtk/SEAP+B/+rmtzhuw5JGMJeQg== 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=fm2; t= 1783437888; x=1783524288; bh=MuvH72CPMghh4np1Z9/jXKMwLtVZsQGj53C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xy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Jul 2026 11:24:47 -0400 (EDT) Received: by mail (OpenSMTPD) with ESMTPSA id ed3f0e63 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 7 Jul 2026 15:24:45 +0000 (UTC) Date: Tue, 7 Jul 2026 17:24:38 +0200 From: Patrick Steinhardt To: Kristofer Karlsson via GitGitGadget Cc: git@vger.kernel.org, Kristofer Karlsson Subject: Re: [PATCH 1/2] t: add tests for ref tombstone scenarios Message-ID: References: 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, Jul 06, 2026 at 01:35:55PM +0000, Kristofer Karlsson via GitGitGadget wrote: > diff --git a/t/perf/p1401-ref-store-tombstones.sh b/t/perf/p1401-ref-store-tombstones.sh > new file mode 100755 > index 0000000000..e40a6dcbf4 > --- /dev/null > +++ b/t/perf/p1401-ref-store-tombstones.sh > @@ -0,0 +1,44 @@ > +#!/bin/sh > + > +test_description="Tests performance of ref operations with many tombstones" > + > +. ./perf-lib.sh > + > +test_expect_success "setup" ' > + git init --ref-format=reftable repo && > + blob=$(echo foo | git -C repo hash-object -w --stdin) && > + for i in $(test_seq 8000) > + do > + printf "create refs/tags/tag-%d %s\n" "$i" "$blob" || > + return 1 > + done >repo/input && > + git -C repo update-ref --stdin + git -C repo for-each-ref --format="delete %(refname)" | > + git -C repo update-ref --stdin > +' > + > +test_perf "recreate refs after mass delete" ' > + git -C repo update-ref --stdin + git -C repo for-each-ref --format="delete %(refname)" | > + git -C repo update-ref --stdin > +' You're not only benchmarking the reference recreation, but also their deletion. If I'm not misreading things, then you can queue cleanups via `test_when_finished`, and these calls will not be measured. > +test_expect_success "setup asymmetric" ' > + for i in $(test_seq 8000) > + do > + printf "create refs/tags/old-%d %s\n" "$i" "$blob" || > + return 1 > + done >repo/input-old && > + sed "s/old-/new-/" repo/input-new && > + git -C repo update-ref --stdin + git -C repo for-each-ref --format="delete %(refname)" | > + git -C repo update-ref --stdin > +' Would it make sense to use separate repositories? Otherwise, state from the preceding benchmark(s) will impact subsequent ones. > diff --git a/t/t0610-reftable-basics.sh b/t/t0610-reftable-basics.sh > index e19e036898..4b7cfe38e4 100755 > --- a/t/t0610-reftable-basics.sh > +++ b/t/t0610-reftable-basics.sh > @@ -1163,4 +1163,26 @@ test_expect_success 'writes do not persist peeled value for invalid tags' ' > ) > ' > > +test_expect_success 'delete and re-create refs with tombstones' ' > + test_when_finished "rm -rf repo" && > + git init repo && > + test_commit -C repo A && > + A=$(git -C repo rev-parse HEAD) && > + cat >input <<-EOF && > + create refs/tags/a $A > + create refs/tags/b $A > + create refs/tags/c $A > + EOF > + git -C repo update-ref --stdin + > + # delete all tags, leaving tombstones > + git -C repo for-each-ref --format="delete %(refname)" refs/tags/ | > + git -C repo update-ref --stdin && > + > + # re-create the same refs and verify they are visible > + git -C repo update-ref --stdin + git -C repo tag -l >actual && > + test_line_count = 3 actual > +' I wonder whether this test really adds any value. We probably have lots of tests already that test creation/deletion of references. Patrick