From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 9E10F1FB07 for ; Mon, 23 Nov 2020 07:06:03 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 08/12] miscidx: cleanup git processes after manifest indexing Date: Mon, 23 Nov 2020 07:05:58 +0000 Message-Id: <20201123070602.9698-9-e@80x24.org> In-Reply-To: <20201123070602.9698-1-e@80x24.org> References: <20201123070602.9698-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We shouldn't leave "cat-file --batch" processes around when we're done with an epoch or inbox, since there could be many thousands. --- lib/PublicInbox/ExtSearchIdx.pm | 1 + lib/PublicInbox/MiscIdx.pm | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index 708f8a3e..890ac282 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -311,6 +311,7 @@ sub _sync_inbox ($$$) { } index_todo($self, $sync, $_) for @{delete($sync->{todo}) // []}; $self->{midx}->index_ibx($ibx); + $ibx->git->cleanup; # done with this inbox, now } sub eidx_sync { # main entry point diff --git a/lib/PublicInbox/MiscIdx.pm b/lib/PublicInbox/MiscIdx.pm index 9dcc96b7..acb49ce7 100644 --- a/lib/PublicInbox/MiscIdx.pm +++ b/lib/PublicInbox/MiscIdx.pm @@ -107,6 +107,7 @@ EOF if (my $ent = $git->manifest_entry($epoch, $desc)) { $data->{"$pfx$epoch.git"} = $ent; } + $git->cleanup; # ->modified starts cat-file --batch } } elsif (my $ent = $ibx->git->manifest_entry) { # v1 $data->{"/$ibx->{name}"} = $ent;