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,AWL,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 CAED21F462; Mon, 10 Jun 2019 21:58:11 +0000 (UTC) Date: Mon, 10 Jun 2019 21:58:11 +0000 From: "Eric Wong (Contractor, The Linux Foundation)" To: meta@public-inbox.org Subject: [PATCH 14/11] v2writable: replace: kill git processes before reindexing Message-ID: <20190610215811.untkksidetf3erf6@dcvr> References: <20190609025147.24966-1-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190609025147.24966-1-e@80x24.org> List-Id: Xapian on Linux <3.15 has trouble with coprocesses since it used fork() for locking and would hold onto pipes used for git unnecessarily. --- I'm not sure if this fixes a problem, actually; but it's a general cleanliness thing and we already have convuluted logic in the SearchIdx.pm code for v1 to deal with the same thing. lib/PublicInbox/V2Writable.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 3484807..09ed4e7 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -533,6 +533,9 @@ W: $list my ($oid, $type, $len) = $self->{-inbox}->git->check($expect_oid); $oid eq $expect_oid or die "BUG: $expect_oid not found after replace"; + # don't leak FDs to Xapian: + $self->{-inbox}->git->cleanup; + # reindex modified messages: for my $smsg (@$need_reindex) { my $num = $smsg->{num}; -- EW