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-ASN: 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 26BD61F934 for ; Sat, 25 Sep 2021 22:16:46 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/2] extmsg: search_partial: use ->isrch if available Date: Sat, 25 Sep 2021 22:16:44 +0000 Message-Id: <20210925221645.13443-2-e@80x24.org> In-Reply-To: <20210925221645.13443-1-e@80x24.org> References: <20210925221645.13443-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This allows us to avoid creating ibx->{search}->{xdb} at this spot by using an `undef' value. This is a step towards eliminating the innocuous "/path/to/inboxdir/xap15 has no shards" messages introduced in commit 63d7b8ce (daemons: revamp periodic cleanup task, 2021-09-23) --- lib/PublicInbox/ExtMsg.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/ExtMsg.pm b/lib/PublicInbox/ExtMsg.pm index b7427b1b..c134de55 100644 --- a/lib/PublicInbox/ExtMsg.pm +++ b/lib/PublicInbox/ExtMsg.pm @@ -32,7 +32,7 @@ sub PARTIAL_MAX () { 100 } sub search_partial ($$) { my ($ibx, $mid) = @_; return if length($mid) < $MIN_PARTIAL_LEN; - my $srch = $ibx->search or return; # NOT ->isrch, we already try ->ALL + my $srch = $ibx->isrch or return; my $opt = { limit => PARTIAL_MAX, relevance => -1 }; my @try = ("m:$mid*"); my $chop = $mid;