about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchIdx.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-05-24 08:32:16 +0000
committerEric Wong <e@80x24.org>2018-05-24 08:32:42 +0000
commitc339a14b11c57e7b330f4efef6903bcbea2b3463 (patch)
tree250bb9b45fb76fbe4057cfd4a7ba087152e14a51 /lib/PublicInbox/SearchIdx.pm
parent62620b9437bfd0f212ad8113d4f51aa079d0d142 (diff)
downloadpublic-inbox-c339a14b11c57e7b330f4efef6903bcbea2b3463.tar.gz
Xapian v1.2.21..v1.2.24 (inclusive) use OFD locks but failed to
set the close-on-exec flag on those locks.  So we must continue
to work around those old versions by ensuring Xapian file
descriptors aren't held any longer than necessary when in
long-running git processes.

Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'lib/PublicInbox/SearchIdx.pm')
-rw-r--r--lib/PublicInbox/SearchIdx.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm
index 74f9267e..107cd345 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -666,6 +666,7 @@ sub _index_sync {
 
                 $self->{over}->rollback_lazy;
                 $self->{over}->disconnect;
+                $git->cleanup;
                 delete $self->{txn};
                 $xdb->cancel_transaction;
                 $xdb = _xdb_release($self);
@@ -696,6 +697,7 @@ sub _index_sync {
                         }
                 }
                 $self->commit_txn_lazy;
+                $git->cleanup;
                 $xdb = _xdb_release($self);
                 # let another process do some work... <
                 if (!$newest) {