From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=202.12.124.149 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796283084; b=C/Nk+dBwjYcQSdYzBGIIwJ9cn8AMFzpjSn4rEys4QYvNQ0dXf9sc+Su6pEbsbuamweMH T4kFSrrgpTMqFGoZ2E9eybBpnMPbg8vRTw9LVaCWxmdNDsQnRsw6x9OKMw7Yhc7GsfMv8 57PPfONFiVSuSqoE+TIh4/zYdddHPOxcm6AOWVEervgKiu9zFEGKMxOLNpGs5ZiR+g/JM yUqJGhpuXtBv9h/oZ8C14YaJuLmxw4+9T7Cpp2BnSsJ9/+C5DIwRPvQxWPKW2A8ZBsdvV MceNNf4HoJc6QC6FNDaKDD+1l2iZsV061Hi1kVsSn+XWf4r9MCzWzeDE/X5BBSeZWYQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796283084; h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature: X-DKIM2-Info:DKIM2-Signature:X-DKIM2-Info:Message-Instance: X-ME-Sender:X-ME-Received:X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID: Received:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=Bae/QX4l2dSBBNtHwDMDlMkawTpLqfSXbws2VU5mdh8=; b=ODd5Ee1D3gItI629nj9An2m9xZscBSW5mCdL5YZzXz5rTiZ6p1/qcApr4sjZyrx8bstt TqfsW/bTrMI/t3+JhrTdNBH9MtA1X7JUWu2zI235IuD0QsoO9z4uVHt8x/0z2kBQzete+ f7p1AMk72JHzlNaxaFpJi+HioMx/gKqCkdCmQh7e5irVEM8cqX2thwO2/s4/Ahc0E8I5Q tsq8XiZ8IEJhWIvnu7I6ReJelNf+Xe5mesTSTO1oqMO5WZqFtiycsl0FokyglfqNvoB8v YGRsCsjHIQ0nbntOYmBDKIoJ18CcH2xHUKQh6RNee/hQ8PNFLxp53VONdSL6loIUr1Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass header.d=pks.im header.i=@pks.im header.a=rsa-sha256 header.s=fm3 header.b=BDMTbpAj; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=yiegLkGu; arc=none smtp.remote-ip=202.12.124.149 Received: from fout-b6-smtp.messagingengine.com (fout-b6-smtp.messagingengine.com [202.12.124.149]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4F72606A322 for ; Thu, 3 Dec 2026 07:31:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B4F72606A322 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, unprotected) header.d=pks.im header.i=@pks.im header.a=rsa-sha256 header.s=fm3 header.b=BDMTbpAj; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=yiegLkGu Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id 1FF141D0022F for ; Thu, 3 Dec 2026 02:31:23 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Thu, 03 Dec 2026 02:31:23 -0500 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=fm3; t=1796283082; x=1796369482; bh=Bae/QX4l2d SBBNtHwDMDlMkawTpLqfSXbws2VU5mdh8=; b=BDMTbpAjvNPNNP6ZeewRE5Bw+t NLI9Jm/k2obBb+zeMqdMrq5oyLjNxGPKmQa4SSKav99NFI5R63flV7rIYGsvAx2O 53MDwZO14O5XiZ0TKSqEJNdjPXidDJp612Zn5lEVaIWw0y5IAOlkYARdq0BpfPih 0TlX2kmvWXMsojtIANpl9WDEdCgFxVXmpodePfxNWIuDEYiVT91XQPX8GsrCLIn2 07fElL2JfyjHB9x4irleYmWd5LR//9CeQQk0law/ciQia0082dAmiXIbXDCA6rJj 6v0zYK9IFoBsY+PZyFpn59P3oHno2Hnxr9NwrdERm5m/iHrOqFqV5Ru2BUlQ== 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=fm3; t= 1796283082; x=1796369482; bh=Bae/QX4l2dSBBNtHwDMDlMkawTpLqfSXbws 2VU5mdh8=; b=yiegLkGukVpe4NDRmCvnoHGjSz6ZpyF+RvsE1Q/Nq4mLEt4ZzKF 5gaX10FkdW9eM764cicbYRkH4xzSyIszy6W2dEmsOZnR8zq/bVzpZ+OtMBGHao7B 7dBfFeNu7r6QL2ZQ9WwgrvYrWN0PMw7dIARlTC7Nj76kiBjE4VQvDiCUk6XmE7DX hr+LgfWpF9oOzuJ8xdqT9px/Gt+nWowwTBVIW1wAFB1p5gS6LLfETJMpYOAcxA78 Zxx9L3odfVZDmbHn1x/S/58wH7dqEQ87b1Ei/U/h9vZLXAiB91c4yNg4CEbgJuoh yGeQzOaoNM6H+AjyvMzKh4LgDhlFQe3cWIg== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=pks.im a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1796283082; d=pks.im; mf=PHBzQHBrcy5pbT4=; rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+; s=fm3:rsa-sha256:lzVS7Fds8U3uBNVQB9tbH4CeRlVEmwUOBmyikzimqzWZmfF bRRhDGUDCxqBoY71kLrEvyIbGr4BdJ/t6hpjRTC53UzpQe4V5CwkkuIHdGiPoJlt 62juWATJvSj0BArdeeUvZb73U5dX0tUmXNRQpkBX5WehEh0Fcc11KbKa4E3wcgM6 yNek/17sOLISYxUo3jyXCmgKs7H5MXzpuI9zpkOBXRW+h8tDf9fEqrgWjxmeZXZU BjAhXPMbhAp5bq123T6binO4CAFeU1Z7cR/6L+Yu4vgEggUf7ZdiaDveLrrNNxze W7j1+mIYz2+56pKDor9fLsVIC3xZPcc/OlvohtA==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-disposition,content-type,date,feedback-id,from, in-reply-to,message-id,mime-version,references,subject,to; Message-Instance: m=1; h=sha256:xsHrYpEb6sLoKuA8zJmxjNOkN0O45EO20BqUfdz3wIk=:Qpn3TDBF8SWe59m0E1Bh5lL8ShMDGgrsQHX9sPgANcI=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGFbcII33+6JX2+KbmAHwlZBYdz/4OVxwOnGr/ZUxpRhx90HJswa6X5/vqeS9azO6 R6IN/2tIPW4IEivH1X2A3txROIbs6KkqE5fW5tHEhDTP8FeDRS7HtyLKbK/jsTkSZOQyj2 XEhzc/x5OO9zZM0t2VipWdu4UOSTpTDUOSAhxCzDxQLcO2wfgdLB3HcHbPslMOLh4GHH2z EEYkXWZxF3WEVzNScfjgBPKKFX/oFnf+QMUGFYG8Z59yQ1AOP5l9B+J5jTB+rYsVkOI/yD 9sdmq2jiyK88iNVLLCY4xYUukNn17MQGPAGyqY+3SDIdUudBnAEqwQlTD4LOnXYAZhgwS+ BqjyEfp0XICDnPS8OIW8hjO+iJhvici8+/1tGe6ISThLNGtzJukaUVh9XLBkNFQUe3FfNu 6fr1EWEnWsAUlG3N1hPSOkEqaSvwg4WaUIhGzEVv9veXJ3aEWeFIZ2suyTjfQlnq3QOQ39 coMC94saLKUUqGvyxvfTR9+/XTuP/QnA5AS7T1ZkJAIUVfbOj/7qFK32yFoA/yN/ShhWEn FhbFBY1eLxglG5hP6hpGVEmWYqv/p/BTBX0yYwVA2I4kk24MdQL8F3+JC5q9RtNcpF0JO0 xysCOggtwrYnfxvc82xUsqXDND95nEosNiyp62WdysoQDeyLhInVqUacEhIQ X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 3 Dec 2026 02:31:21 -0500 (EST) Received: by mail (OpenSMTPD) with ESMTPSA id 697e3bee (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 3 Dec 2026 07:31:19 +0000 (UTC) Date: Thu, 3 Dec 2026 08:31:16 +0100 From: Patrick Steinhardt To: Justin Tobler Cc: git@vger.kernel.org, Junio C Hamano Subject: Re: [PATCH v2 5/7] commit-graph: decide mergeable and chainable layers by depth Message-ID: References: <20261120-pks-odb-pluggable-commit-graphs-v2-0-31f2341a9932@pks.im> <20261120-pks-odb-pluggable-commit-graphs-v2-5-31f2341a9932@pks.im> X-Mailing-List: git@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Dec 02, 2026 at 05:38:42PM -0600, Justin Tobler wrote: > On 26/11/20 01:22PM, Patrick Steinhardt wrote: > > When writing a split commit graph, `split_graph_merge_strategy()` > > decides which layers of the existing chain get merged into the new > > layer and which layer the new one builds upon. This is decided on two > > simple rules: > > > > - A layer may be merged in case it is part of the same local object > > directory. > > Layers in an alternate object directory are not considered mergeable. > Makes sense. > > > - A layer may be added to the chain in case it is either a split > > commit graph layer, regardless of whether it is local or not. Or in > > case it is local, we may also add it to our chain in case it is a > > non-split commit graph, in which case we convert it to a split one. > > I found the wording here to be a bit confusing. IIUC, any existing layer > can be used as a base regardless of whether its in the primary or > alternate object directory. A normal "non-split" commit graph can also > be converted to have a layer added to it, but only if its in the local > object directory? Yes, exactly. The reason that we can only use a _local_ non-split commit graph as layer in our new chain is that we need to rename it from "objects/info/commit-graph" to "objects/info/commit-graphs/*". And as we don't want to modify data in our alternates we refuse to do that for any non-local commit graph. > > These checks require us to know about where exactly these commit graphs > > are stored on disk as we compare directories of the respective files > > with one another to figure out whether or not a layer is local. So as a > > consequence, this policy becomes backend-specific once the backend > > controls where exactly commit graphs are stored. > > > > Refactor the code so that we instead tell the merge strategy how many of > > the topmost layers are mergeable and chainable, respectively, which will > > let the backends decide on that property. > > Ok IIUC, it sounds like the intent here is to have a generic means to > merge commit-graph layers without having to know about backend specific > details like where they are located on disk. Should the geometric > progression check also be part of the backend specifc logic? For now, maintaining the geometric progression stays inside the generic logic so that it does not have to be reimplemented by every backend. Like this we can guarantee that options like "--size-multiple=" work the same across backends. It could of course be that eventually, an alternative backend wants to have its own logic around that. But until we have a good reason I'd rather keep it generic. > Thinking about this some more, is the intent to make the > commit-graph-chain format itself pluggable? Yes, exactly. The on-disk format of the commit-graph layers themselves is still forced to be the same across backends, but with those changes here we can already hand over the format of the commit graph chain to the backend. As mentioned elsewhere, I think it's a rather arbitrary limitation to also force the on-disk format of the commit-graph layers, and that may be a limitation we eventually want to lift. But for now I think it's good enough, and I don't want to architect around a potential future use case that may never materialize, as that would very likely just add complexity without immediate benefit. For context: with the multi-version concurrency control backend that we have at GitLab [1] we actually want to take control of the commit graph chain format. The central data structure there is a "manifest" that essentially references all artifacts that make up the current version of a repository, so the reftables, packfiles, commit graphs etc. And that manifest essentially already encodes the "tables.list" file that we use for reftables, so it's only logical to do the same for the commit graph layers and have it replace the commit graph chain format, as well. Thanks! Patrick [1]: https://gitlab.com/gitlab-org/git/-/tree/mvcc-master