From 4aaf4890790f32e7bb1a091cbb7fe40cb0abe90e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 26 Mar 2021 09:51:23 +0000 Subject: lei q: skip lei/store->write_prepare for JSON outputs JSON outputs won't write to lei/store at all, so there's no point in forking the store worker if it's not already running. LeiSearch object ($lse) is also fork-safe until it opens a persistent FD for Xapian/SQLite so we can unconditionally carry it across fork. --- lib/PublicInbox/LeiXSearch.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/PublicInbox/LeiXSearch.pm') diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm index f64b2c62..6410e0ea 100644 --- a/lib/PublicInbox/LeiXSearch.pm +++ b/lib/PublicInbox/LeiXSearch.pm @@ -430,6 +430,7 @@ sub do_query { $lei->{1}->autoflush(1); $lei->start_pager if delete $lei->{need_pager}; $lei->{ovv}->ovv_begin($lei); + die 'BUG: xdb|over open' if $lei->{lse}->{xdb} || $lei->{lse}->{over}; if ($l2m) { $l2m->pre_augment($lei); if ($lei->{opt}->{augment} && delete $lei->{early_mua}) { -- cgit v1.2.3-24-ge0c7