From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 8DF0C1FA1A for ; Wed, 20 Jan 2021 05:04:51 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 6/7] lei_xsearch: keep l2m->{-wq_s1} while preparing query Date: Wed, 20 Jan 2021 14:04:48 +0900 Message-Id: <20210120050449.71330-7-e@80x24.org> In-Reply-To: <20210119093435.17955-1-e@80x24.org> References: <20210119093435.17955-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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(-) 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;