From ddb34f3e901c2e93e9b02dbac31961225b33379f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 3 Jan 2021 02:06:17 +0000 Subject: searchidxshard: use add_xapian directly for v2 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. --- lib/PublicInbox/SearchIdx.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/PublicInbox/SearchIdx.pm') 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); } -- cgit v1.2.3-24-ge0c7