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
--
unsubscribe: meta+unsubscr...@public-inbox.org
archive: https://public-inbox.org/meta/

Reply via email to