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-ASN: 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 87D201F4C0; Tue, 22 Oct 2019 01:28:41 +0000 (UTC) Date: Tue, 22 Oct 2019 01:28:41 +0000 From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 4/3] v2writable: move git->cleanup to the correct place Message-ID: <20191022012841.GA7175@dcvr> References: <20191021110221.23753-1-e@80x24.org> <20191021110221.23753-4-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191021110221.23753-4-e@80x24.org> List-Id: We need to stop the git process to avoid leaking FDs to Xapian if we recurse ->index_sync on reindex. --- lib/PublicInbox/V2Writable.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 7ece6b01..33c0038d 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -1280,8 +1280,8 @@ sub index_sync { $self->{current_info} = "multi_mid $oid"; reindex_oid_m($self, $sync, $git, $oid); } - $git->cleanup if $git; } + $git->cleanup if $git; $self->done; if (my $nr = $sync->{nr}) {