]> Sergey Matveev's repositories - public-inbox.git/commitdiff
extsearchidx: do not process eidxq w/o config
authorEric Wong <e@80x24.org>
Fri, 1 Oct 2021 21:44:18 +0000 (21:44 +0000)
committerEric Wong <e@80x24.org>
Sat, 2 Oct 2021 08:01:07 +0000 (08:01 +0000)
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

index c34225b29d9a5249f89f5f7fc036b4d2666caf4a..f0992e5ea1c1ba5f732de3cda97af5a88620d608 100644 (file)
@@ -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