diff options
author | Eric Wong <e@80x24.org> | 2021-03-26 09:51:23 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-03-26 21:51:30 +0000 |
commit | 4aaf4890790f32e7bb1a091cbb7fe40cb0abe90e (patch) | |
tree | 6530776c106f1591855561ffeac2f5a69cd8a306 /lib/PublicInbox/LeiXSearch.pm | |
parent | 90ca1ac28edb2e8a64c30bb4be723643c646df89 (diff) | |
download | public-inbox-4aaf4890790f32e7bb1a091cbb7fe40cb0abe90e.tar.gz |
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.
Diffstat (limited to 'lib/PublicInbox/LeiXSearch.pm')
-rw-r--r-- | lib/PublicInbox/LeiXSearch.pm | 1 |
1 files changed, 1 insertions, 0 deletions
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}) { |