Article View: linux.kernel.git
Article #3926Re: [PATCH] read-cache: hash the shared index even with index.skipHash
From: Junio C Hamano
Date: Thu, 26 Nov 2026 19:21
Date: Thu, 26 Nov 2026 19:21
42 lines
14862 bytes
14862 bytes
"blanet via GitGitGadget" <gitgitgadget@gmail.com> writes: > From: Xing Xin <xingxin.xx@bytedance.com> > > The shared index of a split index is named after its trailing hash, > which the split index records in its "link" extension to find it. > Since ee1f0c242e (read-cache: add index.skipHash config option, > 2023-01-06), do_write_index() skips that hash for the shared index > too, so with index.skipHash and core.splitIndex both set, the shared > index is written as "sharedindex.<null OID>" and the split index > records a null OID as its base. Reading the index back, a null base > means there is no shared index: the entries that were moved there are > lost, "git ls-files" no longer shows them and "git status" reports > them as deleted and untracked. With fsmonitor, it hits a BUG() in > fsmonitor.c instead, as the fsmonitor bitmap refers to more entries > than the index has. It is correct to point out that the two "features", skipHash and splitIndex, are incompatible. With skipHash, splitIndex will not correctly work. We can say skipHash breaks splitIndex. But does this change to _force_ the base index files to be hashed, against the user's wish expressed by skipHash, take us in a better direction, I have to wonder? With this change, skipHash's promise to improve performance is not kept. We can say splitIndex breaks skipHash. Stepping back a bit, isn't the expectation of splitIndex that these incremental modifications held in non-base index files are relatively small, thanks to the bulk of data that the base index file holds covering almost everything in the repository? In other words, isn't the use of splitIndex a strong sign that the base index file would benefit the most from skipHash? And this patch is breaking the skipHash feature for the use case that would benefit the most. And not hashing the index files that are not bases would not save as much, since they are expected to be much smaller. I wonder if going in the other direction, i.e., when both are enabled, disabling splitIndex and working only on the base hash, would be an alternative that is equally viable as this change? Both will *break* the promise of one feature so that the result can live with the other feature. What are the pros and cons between them?
Technical Details
Message-ID:
<xmqqld6fjt55.fsf@gitster.g>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-76472-linux-kernel-git=dewy.ruReferences:
<pull.2337.git.1795701443098.gitgitgadget@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-76472-linux-kernel-git=dewy.ru
From: gitster@pobox.com (Junio C Hamano)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH] read-cache: hash the shared index even with index.skipHash
Date: Thu, 26 Nov 2026 11:21:26 -0800
Organization: Usenet Network
Message-ID: <xmqqld6fjt55.fsf@gitster.g>
References: <pull.2337.git.1795701443098.gitgitgadget@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: usenet.network;
logging-data="543603"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:JCgbsM9hTLfFHxuoREkkxhGVzLQ= sha256:qoLsekUuv2iKSuUkipr7JyvyL1pqP+I8FJlSRw1wdr4=
sha1:5vAHIW+qhzs3urWGy56ovw3g9EI= sha256:jCPP7BYAJYCf9zJaF7yC4ihVbc/VilAaWD9XRfg58+s=
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 AD630125EF6; Thu, 26 Nov 2026 22:21:51 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.95
X-Spam-Status: No, score=-1.95 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,
HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=pobox.com header.b=YSVpw/Fq; dkim=pass (2048-bit key)
header.d=messagingengine.com header.b=IikD/irQ
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 9eppoknXsk-z;
Thu, 26 Nov 2026 22:21:48 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-76472-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=pobox.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 902F9125EF2; Thu, 26 Nov 2026 22:21:33 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id E697F2FFE1; Thu, 26 Nov 2026 19:21:30 +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=1795720890;
b=zq/jnFZhfOX+zh68TYkBsiVTohSWlr5+SVBalCgADuSk46Bh479enNsodsXvha07WtGv
M0zfG/hYdApW/fuqQfiHPvR/8+kKUg4Ll7oGgu9cScnvbHzUeNZIsKJs2uS/Ob3t8EBn1
SSGh8JHAWPJEWFlLcCT9KG2pdYKPCPePF2l4u93aAYz5LCDZlMz/9Bggu8/RlYa9TIfqa
1w2rKXlGY1WdZ4kMo0puqaOKtFMeYb2IvO2gotuJq8obH4WKEhPlQtHouocyvnnd5wC+9
hcpQBq5yev100v/rG0VBjWZtt0WAK3x0WP0peBQMLXWxN7J8cP32nDL+w6NLwtd0iww==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795720890;
h=X-Original-To:Received: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:From:To:Cc:Subject:In-Reply-To:
References:Date:Message-ID:User-Agent:X-Mailing-List:List-Id:
List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
Precedence:MIME-Version:Content-Type;
bh=DRvbgKCq5O2ejdEYEZnPNewOZ1F0rSok3kX12P+xOHk=;
b=P+RvdKtw+lEkPQ3y4kOeqpDqh4ihk76G3ECH7iJ3I3g5elxy6Cho+gBSFmPxrJDmjQKW
+sPgpJgQQl1Qalvla2hQk+zL4LChSal4km9OOkR1V4JTmgmNwaOI9KlZSXumpLb90yJNZ
LBTGbR5YiHCn/0HasaufjVx+PVF8vYfESCb2Y1KaFuTHoxtv9tTFE5dOhD55lBjl9Vnyq
7q31yPTeex+l+utU6i2lupOLbedVlxU1kQ1EHcFslPETHwZvV8ksgce35nMuc8byWCf4R
Ic4ghxM8/5y5T8aq0aUxDRZzR9J1tauQPdBe8SmQcpH6mttULfxtWZmxpBqGm0UR4FQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=pobox.com header.i=@pobox.com header.a=rsa-sha256 header.s=fm2 header.b="YSVpw/Fq";
dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b="IikD/irQ";
dmarc=pass header.from=pobox.com;
spf=pass smtp.mailfrom=pobox.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 1E6D3606A329;
Thu, 26 Nov 2026 19:21:30 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=pobox.com header.i=@pobox.com header.a=rsa-sha256 header.s=fm2 header.b=YSVpw/Fq;
dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=IikD/irQ
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=202.12.124.156
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1795720889;
b=zq+nLyfvV6/XwXO+TqUysODSOHNYMCDasMvkAgq8ANr2wQEqydYaQXKp5VANqoeli+ph
zGXJXAfqppMsnbLm3SNXzAUwGUMdCJaRohnCcCMh0OfEUBiOCIvm0cUjPQWW//erKqbzt
1HCyqKOMWOiZMBnm6J1rUE8bfX679c/biX4oVwx3eU2yRskI3pJqW2G66b8e/ofrbNQXT
LF4SA011s++VsX8X7Iy/4EtxRuM2APNpFNcFJw3Np2EiJTRCEjGEf3p0ia/8TxOL1k+5j
Byqm2m5s2tQ+nDPkd0yqIXLg+JNyE5o7VUg8wB27h2xAS4OzeOjnu/AI9FcHRU5UoYA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795720889;
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:From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
User-Agent:MIME-Version:Content-Type;
bh=DRvbgKCq5O2ejdEYEZnPNewOZ1F0rSok3kX12P+xOHk=;
b=306U796GDhbb59TKs1zndKtez4Em3hHa4VJFflD3lhnef+76X7MPq+3LxeP7YIqco/Wb
JxrbdaEX8kL0MDE6eSgCwkrCE/ojsRog5Ss2na86rQQr6fK0ABXduejVV2DNZdL3d8T3B
A5KXdQ1IjRk7jNEJU9yqjLEcrfZk7XNDDi1Die4IPgvCEhzxwPTs26GC5KGZ6xN6jPSXt
E8sTpmBvv34n3flqRb7jP347VbZ07h2Bunt8zoLQLgDQmfotZy1IBTJnQ6fGLZiTrrCEQ
2quhhEnfCw7CpYH15U/5wGukD545qRw9boo7U8xT9N8Wvt+M+SExrW0BxvCTGeUIdXQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=pobox.com;
spf=pass smtp.mailfrom=pobox.com;
dkim=pass header.d=pobox.com header.i=@pobox.com header.a=rsa-sha256 header.s=fm2 header.b="YSVpw/Fq";
dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b="IikD/irQ";
arc=none smtp.remote-ip=202.12.124.156
X-Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156])
(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 DBEAE606A323
for <git@vger.kernel.org>; Thu, 26 Nov 2026 19:21:28 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DBEAE606A323
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com
X-Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41])
by mailfhigh.stl.internal (Postfix) with ESMTP id 14A3B7A0497
for <git@vger.kernel.org>; Thu, 26 Nov 2026 14:21:28 -0500 (EST)
X-Received: from phl-frontend-02 ([10.202.2.161])
by phl-compute-01.internal (MEProxy); Thu, 26 Nov 2026 14:21:28 -0500
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; 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=1795720887; x=1795807287; bh=DRvbgKCq5O
2ejdEYEZnPNewOZ1F0rSok3kX12P+xOHk=; b=YSVpw/FqGczn6lY0tNyRZxq6eI
3bPD4aKBv2tSPfBybd8MgyNxQl7lWwGDXh+wDAyDWBPv4f5Iu7wZe731YufPg/pc
Y0omcc9cwtKHZWg4yzsdWXMOmnjFZfuC8Z9MO2L2GJ6qVJdDxDY8i1zWUpqkk3JJ
m6f+C6r6OBoAlepS7Y1nx2JLqhKDVIPsV+b8mSuwIoREaF4yZDlzDRjN9bGboE9+
LsjtyeaDzxXGCQHXLovoGtLdePgrrSeOGBXD6B3gCUNBQUxfXdLf1MArjKw5R0CI
Mnuv1mlEQh5O2BCE9g/QnPAkScI3ZmYswrrPmbSvad+83SLLGiDFPPw+UWFA==
X-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=
1795720887; x=1795807287; bh=DRvbgKCq5O2ejdEYEZnPNewOZ1F0rSok3kX
12P+xOHk=; b=IikD/irQtsykGz8eCQj3/ay7k+tcGuRjZwHPCU0gZAS32/D9W33
j735Cp0dz5GdyI4LwL9T68U6UOzQ9ywxsFKIk7NkNYimmsc7Iq73YYPgUwUpXIdR
TIbehm52hy+mwFjMPky28vdFc6ZHCauvba1ReY3dtT/+XtE2bCuVsmPE8DEY89mp
eG4tds3FEMi6kknoRgBqfR+QiTSrddqlN4VaKxcK7dZZPhselrzHXZ6wo3XPP0Tf
YdhJuVPwJO7vJW7sY+fmAQM0HcM23ryr2FnPX6pRfkuqbw8DaFE7sgE8k+TiMQy9
fea8cr1F52Ui2qELAC7YtWO1j4OA29HPurA==
X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09;
repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox;
action=sign d=pobox.com a=rsa-sha256;
X-DKIM2-Signature: i=1; m=1; t=1795720887; d=pobox.com;
mf=PGdpdHN0ZXJAcG9ib3guY29tPg==;
rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+;
s=fm2:rsa-sha256:iAF4OrSht7skc6aMtw4cbW/XKONdHA/lJoUbTjm0XBoNqcy
yfpC3vtpJGlIR3GdjQomrfnXVKwulJl5siesw7VYnHLeWNkFElzTrAKqlS2hPMhp
jU9wBj8rHFhpyuQMacVxlKxGqJZ5+ZW29Y7lUqt8msW7tg5OBfvFkwf6pqdsXDPb
oCh9q3FGICAUGYqf+FvII++uaZ4tYVKHve7dB6Zmbq0fN9Z3fByL6MNedt96SGgR
mPcxML64OFXCW+A2isv+TZeAYDPpO0ddV+eDZ8ROV75L3zyjKGFV1h69vsKR8EFm
er8ux/jVWwU6RyPibkuctDkBjSmLcLeG01cVNGg==;
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-type,date,feedback-id,from,in-reply-to,message-id,
mime-version,references,subject,to,user-agent;
X-Message-Instance: m=1; h=sha256:+bzu9QQARyhqBUnjneqk/7h8XsFob1pUmExFHNPxYKA=:2HIECZxbb+KYD0yrSMTzjat91xk9DvFpGZ35HP3Vk2A=;
X-ME-Sender: <xms:t4YIaxPavkBFsoksS8WcZUg4qvp32S-r2DDQOFrzb_01dA1I2dv_bw>
<xme:t4YIa63S4Kc97ZAKlviJS2ilp1Kqq637Hia8UJkgnYUhDKDi1WxhKi2788TQxbTIl
TD0XPhbSPXkypBcQtwNcNS4xSM81XUngLFywU64NKtpK4vUzo281Nc>
X-ME-Received: <xmr:t4YIa4m0j1hOjr548xf-Yr-dUJmHRx230Pn9vFg2aVw0fkotjFQfPqK0ybgZyB3Bnwq3LvFh34wyp1qlZc1336pj0f2UmiwQPJqIX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.com (Postfix) with ESMTPA; Thu,
26 Nov 2026 14:21:27 -0500 (EST)
X-Cc: git@vger.kernel.org, blanet <bupt_xingxin@163.com>, Xing Xin
<xingxin.xx@bytedance.com>
X-In-Reply-To: <pull.2337.git.1795701443098.gitgitgadget@gmail.com> (blanet via
GitGitGadget's message of "Thu, 26 Nov 2026 13:57:23 +0000")
X-User-Agent: Gnus/5.13 (Gnus v5.13)
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