From: "Jeff Hostetler via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: dstolee@microsoft.com, Junio C Hamano <gitster@pobox.com>,
Jeff Hostetler <jeffhost@microsoft.com>
Subject: [PATCH 1/3] midx: verify: add midx packfiles to the packed_git list
Date: Mon, 18 Mar 2019 07:29:57 -0700 (PDT) [thread overview]
Message-ID: <d1a730df94a02f4424fa1b9e543981aea4999d77.1552919394.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.166.git.gitgitgadget@gmail.com>
From: Jeff Hostetler <jeffhost@microsoft.com>
Fix "git multi-pack-index verify" to handle repos with thousands
of packfiles.
Midx verify adds the individual "packed_git" structures to the
multi_pack_index.packs array, but it does not add them to the
"repository.objects.packed_git" list. During the verification
code, each packfile is opened and scanned. And "pack_open_fds"
is incremented. If "pack_open_fds" equals the "pack_max_fds"
open_packed_git_1() calls close_one_pack() to LRU-style close
an already open packfile. But because the packfiles were never
added to the "packed_git" list, close_one_pack() does nothing.
If there are very many packfiles, Git runs out of file descriptors
and fails.
Note that this was observed on Windows when build with GCC and
in a repository with more than (2048-25) packfiles.
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
---
midx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/midx.c b/midx.c
index 8a505fd423..d2c39b6d37 100644
--- a/midx.c
+++ b/midx.c
@@ -971,6 +971,9 @@ int verify_midx_file(const char *object_dir)
for (i = 0; i < m->num_packs; i++) {
if (prepare_midx_pack(m, i))
midx_report("failed to load pack in position %d", i);
+
+ if (m->packs[i])
+ install_packed_git(the_repository, m->packs[i]);
}
for (i = 0; i < 255; i++) {
--
gitgitgadget
next prev parent reply other threads:[~2019-03-18 14:30 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-18 14:29 [PATCH 0/3] multi-pack-index: fix verify on large repos Jeff Hostetler via GitGitGadget
2019-03-18 14:29 ` [PATCH 2/3] midx: verify: group objects by packfile to speed up object verification Jeff Hostetler via GitGitGadget
2019-03-18 15:53 ` Ævar Arnfjörð Bjarmason
2019-03-18 21:39 ` Jeff Hostetler
2019-03-18 22:02 ` Ævar Arnfjörð Bjarmason
2019-03-19 4:08 ` Junio C Hamano
2019-03-19 14:00 ` Jeff Hostetler
2019-03-19 14:06 ` Ævar Arnfjörð Bjarmason
2019-03-18 14:29 ` Jeff Hostetler via GitGitGadget [this message]
2019-03-18 14:29 ` [PATCH 3/3] trace2:data: add trace2 data to midx Jeff Hostetler via GitGitGadget
2019-03-19 14:37 ` [PATCH v2 0/4] multi-pack-index: fix verify on large repos Jeff Hostetler via GitGitGadget
2019-03-19 14:37 ` [PATCH v2 1/4] progress: add sparse mode to force 100% complete message Jeff Hostetler via GitGitGadget
2019-03-19 16:42 ` Eric Sunshine
2019-03-19 18:33 ` Jeff Hostetler
2019-03-19 18:46 ` Eric Sunshine
2019-03-19 14:37 ` [PATCH v2 2/4] trace2:data: add trace2 data to midx Jeff Hostetler via GitGitGadget
2019-03-19 14:37 ` [PATCH v2 3/4] midx: verify: add midx packfiles to the packed_git list Jeff Hostetler via GitGitGadget
2019-03-19 19:53 ` Jeff Hostetler
2019-03-19 14:37 ` [PATCH v2 4/4] midx: verify: group objects by packfile to speed up object verification Jeff Hostetler via GitGitGadget
2019-03-21 19:36 ` [PATCH v3 0/4] multi-pack-index: fix verify on large repos Jeff Hostetler via GitGitGadget
2019-03-21 19:36 ` [PATCH v3 1/4] progress: add sparse mode to force 100% complete message Jeff Hostetler via GitGitGadget
2019-03-21 19:36 ` [PATCH v3 2/4] trace2:data: add trace2 data to midx Jeff Hostetler via GitGitGadget
2019-03-21 19:36 ` [PATCH v3 3/4] midx: add progress indicators in multi-pack-index verify Jeff Hostetler via GitGitGadget
2019-03-21 19:36 ` [PATCH v3 4/4] midx: during verify group objects by packfile to speed verification Jeff Hostetler via GitGitGadget
2019-03-22 5:37 ` [PATCH v3 0/4] multi-pack-index: fix verify on large repos Junio C Hamano
2019-03-25 17:18 ` Jeff Hostetler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d1a730df94a02f4424fa1b9e543981aea4999d77.1552919394.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jeffhost@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).