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 D85F41F8C8 for ; Fri, 1 Oct 2021 21:44:18 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] extsearchidx: do not process eidxq w/o config Date: Fri, 1 Oct 2021 21:44:18 +0000 Message-Id: <20211001214418.25876-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: When indexing a single inbox, do not attempt reindexing code paths without a full config, otherwise ordering comparisons won't work. --- lib/PublicInbox/ExtSearchIdx.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index c34225b29d9a..f0992e5ea1c1 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -688,6 +688,7 @@ sub prep_id2pos ($) { sub eidxq_process ($$) { # for reindexing my ($self, $sync) = @_; + return unless $self->{cfg}; return unless eidxq_lock_acquire($self); my $dbh = $self->{oidx}->dbh; @@ -882,6 +883,7 @@ sub _reindex_inbox ($$$) { sub eidx_reindex { my ($self, $sync) = @_; + return unless $self->{cfg}; # acquire eidxq_lock early because full reindex takes forever # and incremental -extindex processes can run during our checkpoints