about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchIdx.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-08-09 00:41:37 +0000
committerEric Wong <e@80x24.org>2016-08-09 00:42:19 +0000
commit200fb98dd5d5f81344e9ab732d2c7ee3f92203e1 (patch)
treec0c16b3435aa08fb5621e72de3f7542338213c08 /lib/PublicInbox/SearchIdx.pm
parent3713c727cda431a0dc2865a7878c13ecf9f21851 (diff)
downloadpublic-inbox-200fb98dd5d5f81344e9ab732d2c7ee3f92203e1.tar.gz
We must ensure cat-file process is launched before Xapian
grabs lock, too.  Our use of "git cat-file --batch" has
the same problem as "git log" did, (which was fixed in
commit 3713c727cda431a0dc2865a7878c13ecf9f21851)
"searchidx: release Xapian FDs before spawning git log"
Diffstat (limited to 'lib/PublicInbox/SearchIdx.pm')
-rw-r--r--lib/PublicInbox/SearchIdx.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm
index 6efc1f3f..0582526e 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -390,6 +390,7 @@ sub _index_sync {
         my $tip = $opts->{ref} || 'HEAD';
         my $reindex = $opts->{reindex};
         my ($mkey, $last_commit, $lx, $xlog);
+        $self->{git}->batch_prepare;
         my $xdb = _xdb_acquire($self);
         $xdb->begin_transaction;
         do {