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 4DEB71FFAF for ; Wed, 3 Feb 2021 08:11:44 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 02/11] lei: further reduce lei2mail FD pressure Date: Tue, 2 Feb 2021 22:11:34 -1000 Message-Id: <20210203081143.24424-3-e@80x24.org> In-Reply-To: <20210203081143.24424-1-e@80x24.org> References: <20210203081143.24424-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We don't need to be sending errors directly to the client, but instead go through lei-daemon or the top-level one-shot process. --- lib/PublicInbox/LeiOverview.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/PublicInbox/LeiOverview.pm b/lib/PublicInbox/LeiOverview.pm index 88034ada..366af8b2 100644 --- a/lib/PublicInbox/LeiOverview.pm +++ b/lib/PublicInbox/LeiOverview.pm @@ -216,7 +216,9 @@ sub ovv_each_smsg_cb { # runs in wq worker usually $wcb->(undef, $smsg, $eml); }; } elsif ($l2m && $l2m->{-wq_s1}) { + my $sock = delete $lei->{sock}; # lei2mail doesn't need it my ($lei_ipc, @io) = $lei->atfork_parent_wq($l2m); + $lei->{sock} = $sock if $sock; # $io[0] becomes a notification pipe that triggers EOF # in this wq worker when all outstanding ->write_mail # calls are complete