From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=103.168.172.155 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795902065; b=5iGP3irBWQKIVEFWfnXLUPm4Z+Xn9nwAC4dx5qZH8IfgXo/eM9i25XIWP4rBGkNTcQVU tv58qSm4c0Dgo5u7ItLMypggE22NmRhCd2ds8bFXXXHmrW2lGBnn6bowVtWqtKTICecHZ rKqscwu0mb/A2Fue7qx3cZcYeXB4EJmFVeOVBFPrkubx5CMLN1D9L+17iybJAaOkKofxu 8u1uLAdYhM3xOURz3aS2zuiDbzu+ehc0/EdD9l4js9UuhOw8A+6wXQHdJTTKXu47vUEar q6Evcb1pGqxYmkfKS8JlCQjvRXn65tfRZk1/JmhegT6V2H8l1PStrThd1raZDttnvDQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795902065; 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=4BOMo1pS+YltNMo04V4f7jT6OmuQUZMTL9L4kozH0O0=; b=AUf38tSKd/97AsgmCZMDLFBQmbcFVLpxaUpp8SyRCp2gmEfJ/ysfrtlQo4R1bZizRHpH Mot7DFM4ddGoi8GqbhKaC0Y+aSrah6DVE333Zb8AhRRJDqvQsfPlO2SIYWdgXS0dKgeba 0u/3yy4nJl7qJiN3Qk/9dXksnuWlMnyOCDP9gcCVmAfg3MrY765MAKHf3JZOK/ysm/rrc mtsGBchEcQBl4GbuU0Yb6Hi18VyYTK6nRgMOdN2WmPaGlGO9zi5WYNVLz1/F2a4APaFxR dp01l2vzDsS/LKtZfQLS646+jQM4tKtK3aQ1zCRaFaWvz3KPKw/wnRPeOD1MwKp7CyQ== 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=ZsnHrIHI; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=5sEUWFbP; arc=none smtp.remote-ip=103.168.172.155 Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) (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 DBE5C606A31C for ; Sat, 28 Nov 2026 21:41:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DBE5C606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com 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=ZsnHrIHI; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=5sEUWFbP Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id 1C31414001FC for ; Sat, 28 Nov 2026 16:41:04 -0500 (EST) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-02.internal (MEProxy); Sat, 28 Nov 2026 16:41:04 -0500 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=1795902064; x=1795988464; bh=4BOMo1pS+Y ltNMo04V4f7jT6OmuQUZMTL9L4kozH0O0=; b=ZsnHrIHIew6jjYkVs7smFINZ8Q +DEoG5AjVpGP2QI7Rw5QmMgud/VI5eP4Zq8Iica6SHkgPHhL+yhctvt+FUqzuPFE 3UcuJ/avbbOq/79iwvkafkIS1a0fPdY7qBkeqOXm5xW760+JRPk1lpszKTQQX51e wJB8f02FG5Rd7ZVd1cnQAu2VD2bDy71Nkky6jA4gXtfA8sEJqsn0olIa1HZcMo3L WIdtB9KJsOzbq+VSC8xHGE8aWzB8SH7JCywhbZdZuPqLnuxKDUEokn5ZhgFSEzBa SpoH1h6SmChM1qFLYhFbzLBDmr2gC84WZYnxGRTQnKxAbq+FAzUI9q58Fzyw== 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= 1795902064; x=1795988464; bh=4BOMo1pS+YltNMo04V4f7jT6OmuQUZMTL9L 4kozH0O0=; b=5sEUWFbPaalLDzkBpRJ/SBEw73DtpFlDi5SebXIRWCAJfwA4480 TpI53MbB69UDqo9QzffqZs2mG7EvDCWzGRoBOMxk0nULdCAK+wA62kezrcgdM8x1 Q7yiAbVW4YFv19l+WZyp9J5zyE2K7LTSD9pfuLtLQFcYgNsvdYaEBw+9JHzq8zYk 1ySRNOG6wDvhvPzhpL5kq6cPjk0i5DFJP7Qma5GRCDH9wLd+MLBXmYgHDL4RMvDZ IXNgzveryqryb2ng2LiewfXSADQPiqUhF5Y3EBwFpXfxHfn8DM7pTKJQ350gaHAK bJXVBb3F8zu7B2pyAyQGoKcDfmfyCPanmmg== 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; DKIM2-Signature: i=1; m=1; t=1795902064; d=pobox.com; mf=PGdpdHN0ZXJAcG9ib3guY29tPg==; rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+; s=fm2:rsa-sha256:nNrHfsZVqN7AogUvgLEEGhq4e2+8V/QDqdYvOKUYQfP8sD4 QYHxwC0k7ZcvvK2354fPL5Bd/arRyHMbenT5rnjJ0PNeQ0vevMyZvCZ6/6ZzhraL hV8hDucR6Z2B2yhcUCgJdfPSzYuTI9JWbcY++MlFnjtbIsEWCfPAAQd2P0+7QHu8 +5ajvuRy5aMdAgboZfjQtMLqjsY8P1FpovIfWKjDe2vN7Ai5I5IBP3hsxxP3SGaO fAId/651/jqEII4S/TunM9mVN1HI4ZV18BATvt/rpGr/9/iK/ecPaovKxVj0FaL6 mEbmcCQJ1MdJlSgxqtV1+7SyCTNkOA7/ZipwAew==; 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; Message-Instance: m=1; h=sha256:gIA5QJ2lmqObgHJo5XW8pRqsDTQDSWKKczMV4cFCnCc=:dGJv3as52rL7q0viQmt/8/cMk/jmkDq90GW7lHHVw0Q=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGUSS4mUvcdz1YSRlnnx5rOOsaeeD0fxgz4v9N83e0EMHNYiA5YRKu64ZSBZ6eMT2 QRDXkV0cfTQorXtc2itqFOEeoFdaWg+4l25AGKcsGfrAbtVYy0rx9WjhY1xck++5GIos26 N4wprn+Qye8bibosdqoRNg/CylK4s3bqDkF1aEcQ+RG1d0v1JQ/HohJWqMvClaQ7h9WRhG PeoK63B7p9pxFbbQ/OdUAA2qnmL/pjz80Mt7Ql7gr5P6m3Es525Yx7a1UdEF9gfWZDtCQ5 wVfcQkFZBmbVOiWA3/y7Hrn7aufIdkBxFgd8/EXVtm0jLpjY9x+U3gqIndnKx047gERCD1 9BkD5QtdVj+cazjbUhXall8YimOgxf8Pk2O3q1mny3gxUNgFITsI1Urc4QLkJHOKW2LHYC lovTK7JUn2uZZNqVH+HpSuG5n217cQ9X1qdJ4T7Jc/tmIEpbaeotBS7uij0qMdoBA7Z65j f5kpr5+ozAu8YeRxRCWFcaq+sxNJJgmdV9OlEnAi+VUhdK9NpE/DptAcDSd1qj06pVrRH/ fz/WBkRONKCQmRtSNqb1DSAbhMDK3r2ikvVY19eWTMXhfJsc2EHLkvsDtW7GeLL5dhtbuD aOSKOSpVwyiQQv1m/NcweE2Y7im/43gn+xI/w5nWFpnOypribZ9BZkkul1IA X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 28 Nov 2026 16:41:03 -0500 (EST) From: Junio C Hamano To: "blanet via GitGitGadget" Cc: git@vger.kernel.org, blanet , Xing Xin Subject: Re: [PATCH v2] read-cache: hash the shared index even with index.skipHash In-Reply-To: (blanet via GitGitGadget's message of "Sat, 28 Nov 2026 09:27:19 +0000") References: Date: Sat, 28 Nov 2026 13:41:01 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) 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 "blanet via GitGitGadget" writes: > From: Xing Xin > > 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." and the split index > records a null OID as its base. Reading the index back, a null base > ... > This gives up index.skipHash on the file where skipping the hash would > save the most per write, as the shared index holds nearly all the > entries. But what index.skipHash saves is the hashing done on each > write, and the split index is designed to make writing a shared index > rare: once there is one, a new one is written only when more than > splitIndex.maxPercentChange of the entries (20% by default) are not > in it. The frequent writes are of the split index, which holds the > entries added or changed since the shared index was written, as well > as all the extensions, and still skips the hash. The updated commit message explains both the failure mode and the trade-off clearly, without overstating the savings on split-index writes. It is also worth checking how concurrent-update detection behaves when both features are active. Suppose a repository has both core.splitIndex and index.skipHash enabled, and "git status" reads the split index and later calls repo_verify_index() before writing back. Because do_write_locked_index() still writes the split index with skip_hash enabled, the split index has a null trailing hash on disk, and merge_base_index() does not overwrite '.oid' or '.file_stat' on the main index_state. Thus verify_index_from() still sees a null '.oid' and falls back to index_file_unchanged() on .git/index, so concurrent updates are still detected correctly? Likewise, "git fsck" runs read_index_from() with verify_index_checksum set, so verify_hdr() accepts the null trailer on .git/index while verifying the real hash on the shared index file.