]> Sergey Matveev's repositories - public-inbox.git/commitdiff
v2writable: replace: kill git processes before reindexing
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Mon, 10 Jun 2019 21:43:52 +0000 (21:43 +0000)
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Mon, 10 Jun 2019 21:43:52 +0000 (21:43 +0000)
Xapian on Linux <3.15 has trouble with coprocesses since it used
fork() for locking and would hold onto pipes used for git
unnecessarily.

lib/PublicInbox/V2Writable.pm

index 3484807b325e6e48aba42a4014ea1b20b24a67bb..09ed4e7b99ff096d194a9e59ff79a9569b745c0f 100644 (file)
@@ -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};