about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-20 14:04:48 +0900
committerEric Wong <e@80x24.org>2021-01-21 03:29:20 +0000
commit9736521dec2aea9b0c23c982b39982c9f411272b (patch)
tree98c46541ea21c3c2db0f9818712ec59122f6f083 /lib
parent1a8441c1e5e468441e67bc7eec6771770e62af78 (diff)
downloadpublic-inbox-9736521dec2aea9b0c23c982b39982c9f411272b.tar.gz
lei_xsearch: keep l2m->{-wq_s1} while preparing query
This caused a performance regression which made parallel
lei2mail processes fail prematurely and fall back to
writing blobs in the lei_xsearch worker.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/LeiXSearch.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm
index fa37543f..a6d827de 100644
--- a/lib/PublicInbox/LeiXSearch.pm
+++ b/lib/PublicInbox/LeiXSearch.pm
@@ -273,9 +273,9 @@ sub do_query {
                 pipe(my ($startq, $au_done)) or die "pipe: $!";
                 $done_op->{'.'} = [ \&do_post_augment, $lei_orig,
                                         $zpipe, $au_done ];
-                $io[4] = *STDERR{GLOB}; # don't send l2m->{-wq_s1}
-                $self->wq_do('query_prepare', \@io, $lei);
+                local $io[4] = *STDERR{GLOB}; # don't send l2m->{-wq_s1}
                 die "BUG: unexpected \$io[5]: $io[5]" if $io[5];
+                $self->wq_do('query_prepare', \@io, $lei);
                 fcntl($startq, 1031, 4096) if $^O eq 'linux'; # F_SETPIPE_SZ
                 $io[5] = $startq;
                 $io[1] = $zpipe->[1] if $zpipe;