From: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: git@jeffhostetler.com, avarab@gmail.com, peff@peff.net,
Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 0/2] Multi-pack-index: Fix "too many file descriptors" bug
Date: Mon, 29 Apr 2019 09:18:54 -0700 (PDT) [thread overview]
Message-ID: <pull.182.git.gitgitgadget@gmail.com> (raw)
Thanks to Jeff H for finding the problem with the multi-pack-index regarding
many packs. Specifically: if we open too many packs, the close_one_pack()
method cannot find the packs from the multi-pack-index to close.
Jeff already fixed the problem explicitly in 'git multi-pack-index verify'
which would hit this issue 100% of the time we had 2000+ packs. This issue
could still happen in 'git rev-list --all --objects' if there are enough
packs containing commits and trees. This series fixes the issue.
The basic solution is to add packs from the multi-pack-index into the
packed_git struct as they are opened. To avoid performance issues, add a
multi_pack_index bit to the packed_git struct. Midx-aware algorithms can
then ignore those packs.
There was a very subtle issue that happens during a 'git repack': we clear
the multi-pack-index after possibly reading some packs from it, thus leaving
some packs in the packed_git struct but having a NULL multi_pack_index in
the object store. This informs the change to close_midx().
I'm based on a recent 'master' commit that contains the following three
branches due to nearby changes causing conflicts if I pick only Jeff's
change as a base:
jh/midx-verify-too-many-packs jk/server-info-rabbit-hole
bc/hash-transition-16
Thanks, -Stolee
Derrick Stolee (2):
midx: pass a repository pointer
midx: add packs to packed_git linked list
builtin/multi-pack-index.c | 2 +-
builtin/pack-objects.c | 2 +-
midx.c | 42 +++++++++++++++++++++++++-------------
midx.h | 7 ++++---
object-store.h | 9 ++------
packfile.c | 30 ++++++++-------------------
sha1-name.c | 6 ++++++
7 files changed, 51 insertions(+), 47 deletions(-)
base-commit: 83232e38648b51abbcbdb56c94632b6906cc85a6
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-182%2Fderrickstolee%2Fmany-packs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-182/derrickstolee/many-packs-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/182
--
gitgitgadget
next reply other threads:[~2019-04-29 16:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-29 16:18 Derrick Stolee via GitGitGadget [this message]
2019-04-29 16:18 ` [PATCH 1/2] midx: pass a repository pointer Derrick Stolee via GitGitGadget
2019-05-07 8:31 ` Junio C Hamano
2019-05-08 14:22 ` Derrick Stolee
2019-04-29 16:18 ` [PATCH 2/2] midx: add packs to packed_git linked list Derrick Stolee via GitGitGadget
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=pull.182.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=avarab@gmail.com \
--cc=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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).