From 9736521dec2aea9b0c23c982b39982c9f411272b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 20 Jan 2021 14:04:48 +0900 Subject: 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. --- lib/PublicInbox/LeiXSearch.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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; -- cgit v1.2.3-24-ge0c7