🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #1682

Re: [PATCH RFC 0/3] cat-file: make remote-object-info request in batches

#1682
From: "Pablo Sabater"
Date: Tue, 27 Oct 2026 20:47
67 lines
13690 bytes
On Tue Oct 27, 2026 at 7:12 PM WET, Junio C Hamano wrote:
> Pablo Sabater <pabloosabaterr@gmail.com> writes:
>
>> A noticeable difference can be seen from a 10k OID batch to a 50k batch.
>> After that the difference isn't as noticeable (the number of batches to
>> be requested isn't that big).
>>
>> I propose 50k OIDs as the default number of OIDs for the
>> remote-object-info batches. Coincidentally, git backfill's default batch
>> size is 50k as well though it's unrelated.
>
> Interesting.  We cannot share any code with backfill as we only
> retrieve info on objects while backfill does grab the objects
> themselves, but using the same number may make it easy to explain in
> the documentation.
>
>> I have barely done any benchmarking before, so I would appreciate
>> any feedback on the one in patch 2. Is there a better way to do it,
>> or other things I should take into account?
>>
>> Should the server also check for a limit on the number of OIDs it
>> accepts in a single object-info request?
>
> What I am more curious about is how this updated code interacts with
> existing code (i.e., updated "cat-file --batch" clients with deployed
> servers, and vice versa).

The code in this series only changes the client side, the server has
no OID limit. Before this series, what prevented large requests was the
client with its 10k hard limit, so the server is fine with any size
without any change.

The server will see requests of at most 10k OIDs from old clients, and
bigger ones from new clients.

The other change compared to an older client is that now multiple
requests can be received on the same connection (instead of one per
connection), but that should be fine, serve() keeps processing requests
until EOF.

With this new option there's a risk (that was already there if someone
modified their client) of setting a huge amount of OIDs in the same
request, but I'm not sure how bad that is, a 1M OID request vs smaller
ones on the same connection. Could you help me with this?

Anyway, the fix would be to add a cap on the server side. It can't be
lower than 10k, or older clients would get an error they can't do
anything about, and if it's lower than the client's batch size it
should be advertised so newer clients can adapt.

IIRC clients ignore unknown capability keys, so advertising it shouldn't
break older ones. In this case, it would be advertised on the handshake
and the client would die() if the user sets a batch size bigger than
what the server advertises. Ideally the default on the client (the
proposed 50k) would be the min cap on the server, so someone that
doesn't manually set the batch size and uses the default value doesn't
get an error.

If we don't even want to die() we could set the batch size as:
	min(user-size, advertised-size)

Sorry for the brainstorm but I just realised that any client could
modify the size and that a cap on the server side could be important.

Regards,
Pablo
Technical Details
Message-ID: <DMFWYZSCTM1C.ZM3OE2DGCMPC@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73565-linux-kernel-git=dewy.ru
References: <20261027-remote-object-info-batch-v1-0-ea7a1f0b1df1@gmail.com> <xmqqld7jj6u5.fsf@gitster.g>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73565-linux-kernel-git=dewy.ru
From: pabloosabaterr@gmail.com ("Pablo Sabater")
Newsgroups: linux.kernel.git
Subject: Re: [PATCH RFC 0/3] cat-file: make remote-object-info request in
 batches
Date: Tue, 27 Oct 2026 20:47:32 +0000
Organization: Usenet Network
Message-ID: <DMFWYZSCTM1C.ZM3OE2DGCMPC@gmail.com>
References: <20261027-remote-object-info-batch-v1-0-ea7a1f0b1df1@gmail.com>
 <xmqqld7jj6u5.fsf@gitster.g>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="1630270"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:wRSDXIO1lHv4UcWsiYPkXIRA2y4= sha256:vj6//GtQYK7IKD0CxJMAqAVjUenCSeoxfxb6/bGNU34=
	sha1:DHI+25V2bgPQxytGy43IZOnHXwQ= sha256:XFua6XSObaq59C7b5JtHhGrpjFYBaQspddlpeNX3hFk=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 80790125C1D; Tue, 27 Oct 2026 23:51:05 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.948
X-Spam-Status: No, score=-1.948 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id HhTImRnoxQMy;
	Tue, 27 Oct 2026 23:51:02 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=git+bounces-73565-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 41BCB125C13; Tue, 27 Oct 2026 23:50:53 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 89246268E2; Tue, 27 Oct 2026 20:47:41 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793134058;
	b=y8kuqrJmwQ5yQmCEBBTBAvLh945dzKDVDzIST2GgnywOkzWc5DVvO75wVJrvXKbBK2MD
	 Ud8Qi6+7tZoe0kKjwoO5oo/ClnJ1L1x0vUXcr9zQmwQISALbb3R96wjTTy1X10p+5Ef/I
	 r4QGlAivZEkP15Ok4hnSDmn88Suwxjr1wC+A9Fq6DTFZ1lfolJNM7oAAdSG8GIzlTaRWt
	 SmZGy5vDpc3OaKErgpmG69LiYMxy41cla6x/EWvTClKi/XHOeEDD8tRI3J2A8mSzFrqyV
	 KvgnZaHqqzS21JsJglLvzxvH0e5kTjn4HLK9LM8ebUm7QDKse/JkrxCQi0w6UJD3tDQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793134058;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:Mime-Version:
	 Content-Transfer-Encoding:Content-Type:Date:Message-Id:Subject:From:
	 To:Cc:X-Mailer:References:In-Reply-To;
	bh=Iy7ekALS2bjCrW2bPde4EyIPmVaqu1PxA8/jK7DRNkg=;
	b=PEklyJMTbbUNThyzcqxXgW4CkNdwjia5OQvcLrRNAgs8e3FZH8iOP9vFmkOPtojo8kIF
	 yjdp/d2ttsPXH6L9AEoLsTb2KPZsTN6+c4PytX6tsAJNXsB877VnqOTYM7nYV/0yfu88S
	 LtrMBvLJpODTc6yLNtXjMcgBkyuLNuiMKWhj9iwe21sYBXj3oWbwAtI9qKWxcPMZmvd3S
	 fRAFjT80goWp1Ii0X7RKbr8kx6lNUgBnWiwGo7wdbKgeWSkaXakS55dAEN1S7cVUj2alU
	 w9pmGIOy33oZf4cPBVnTpbkUWyov/fBA86/wpp1vVzV7UrZ6dDeLJHhL1axYvFlc5YQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=wFVdIbfn;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 80436606A326;
	Tue, 27 Oct 2026 20:47:38 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=wFVdIbfn
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.41
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793134057;
	b=LZoq58CP8iV8oZ4nJ6HVII7vyde0sKgC12Qhthp+rPeOhJjmMtk3mCTT5kWvFQJt061v
	 F+K9Rfjc4yp5bHMo+0ieytlNhns6+MmRlhM7zSa2rpCM9T3HSJZAXO0fWnuRURKc5o4qz
	 mkwQkQXvCMoc030xE0PQ1wdPV/bIy/mFYx20RI5Fh6uqHipWgwHFk1HbMLD0kKVPeBBXZ
	 9guRNcwFO8FBG9mSCBzjUiONZAuqwaVvXDAce/Zpbfsr2yz8Livzz/4ALgyohnkb3uYJK
	 eWWCFrPzW17hrITJtk9KxdWnT8kN+QQhRW1FG3MR+s3glb7O2WNWlOzXGUhmPzrBqEA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793134057;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Mime-Version:
	 Content-Transfer-Encoding:Content-Type:Date:Message-Id:Subject:From:
	 To:Cc:X-Mailer:References:In-Reply-To;
	bh=Iy7ekALS2bjCrW2bPde4EyIPmVaqu1PxA8/jK7DRNkg=;
	b=sratqH4mHbcqa9JLn4IRw1HQY1aN2YOeKb2DtBtj38zHOBnY31eML7ZOAu1coh/kXN6w
	 4csMqaIlKPRec6I9ZWyYck1ISnuKl4x76f7krtVUioek2MgDfrT2888ftHbG9sDCdcKiA
	 ScaWcULV0On4KhWoS/zFIpMQrlLNxfMyp3b84e1WsVJecomZoGfQNAsy4D094GbThLEvW
	 Dm68LAP5XMqTlHcAhtjm1K2psKAZ4iiqF6ObTeZKYrleXdN5JWYS/yxUZHQXSmV7FkZVX
	 2HkLD2/gJUzW6cQvZi+dTZQDlSiACNLd19bCDvhAEBtkJO3HrXxFPHfj3ndr8BUo1yQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=wFVdIbfn;
	arc=none smtp.remote-ip=209.85.128.41
X-Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 484FD606A320
	for <git@vger.kernel.org>; Tue, 27 Oct 2026 20:47:37 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 484FD606A320
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4a4d7ae1ae9so2442425e9.1
        for <git@vger.kernel.org>; Tue, 27 Oct 2026 13:47:37 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1793134056; x=1793738856; darn=vger.kernel.org;
        h=in-reply-to:references:cc:to:from:subject:message-id:date
         :content-type:content-transfer-encoding:mime-version:from:to:cc
         :subject:date:message-id:reply-to:content-type;
        bh=Iy7ekALS2bjCrW2bPde4EyIPmVaqu1PxA8/jK7DRNkg=;
        b=wFVdIbfnzFT1f73WcEhisXbHzgRz2mCMsn8h0zTUt6cEtMo7CUqGqSv/RY5wwcL3Ck
         Fki1dYSv8y6m4tF6jWRsNfZLlZKcx+Scmq03iKkEVu5Dumgxn/UeglcenKcfx1/qFfaM
         r3c3oBWexPEWOQfUfBHSd2NAgXiB2UJECKS+qcgwU2Y1jpsCBKAv2sgoxEX3wvbiQfZD
         WDJNMNDoUtvkfw4lESj4eoOR5WrnvchvLtzLysxj7Rxs5I9AqmLu7A0FShzegSyY4tKk
         FNRGr+Hrgb70EeX8xfQtVIAfOGKNck3qsE9imla28puYRWVvKA7rwSL2linE6KBNHLlq
         EguA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1793134056; x=1793738856;
        h=in-reply-to:references:cc:to:from:subject:message-id:date
         :content-type:content-transfer-encoding:mime-version:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=Iy7ekALS2bjCrW2bPde4EyIPmVaqu1PxA8/jK7DRNkg=;
        b=VzxLEp00lOhBiyocNd5UMCC+LPty3ZQt3AqUMHTewTJF2RDNR6w7pb/OaGefdRtcMk
         PB7FNxBmMCTmpzRVShtGJWZ4L9p95QYBdQO906ZpEH2J8mOT1Zx8yVrPab3RquxGRZjO
         ypnmBmTAtWWT1BnNhb2SnCu82zXZzmPSN3B1rCBfEeZG4ZRfdfyPkurF9DFyj9JupL4h
         6tOrVVSQnnoz5CRMnh5U3AskzzRopZpNDoFI4Szm3/Y/9tJ6OYuSOxEdZJZeDrj6CHgr
         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134055444;
        Tue, 27 Oct 2026 13:47:35 -0700 (PDT)
X-Received: from localhost ([2001:818:c665:a700:d08f:88e:8091:3e4])
        by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a92de010bcsm11528535e9.0.2026.10.27.13.47.33
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Tue, 27 Oct 2026 13:47:34 -0700 (PDT)
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-Cc: <git@vger.kernel.org>
X-Mailer: aerc 0.21.0
X-In-Reply-To: <xmqqld7jj6u5.fsf@gitster.g>