about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchIdx.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-03 02:06:17 +0000
committerEric Wong <e@80x24.org>2021-01-03 18:30:33 +0000
commitddb34f3e901c2e93e9b02dbac31961225b33379f (patch)
treeac7eec3a95e2a903f2b1bca4ccda303e07c337b6 /lib/PublicInbox/SearchIdx.pm
parent02ff5cc7ecfe3e36cdd1898c4747c28d83de0e1a (diff)
downloadpublic-inbox-ddb34f3e901c2e93e9b02dbac31961225b33379f.tar.gz
We can more clearly distinguish between v1 and v2-only code
paths this way, and may be able to save a few cycles this way.
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 a7005051..adced076 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -397,6 +397,7 @@ sub eml2doc ($$$;$) {
 
 sub add_xapian ($$$$) {
         my ($self, $eml, $smsg, $mids) = @_;
+        begin_txn_lazy($self);
         my $doc = eml2doc($self, $eml, $smsg, $mids);
         $self->{xdb}->replace_document($smsg->{num}, $doc);
 }