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 CCACB1FB09 for ; Mon, 23 Nov 2020 07:06:03 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 10/12] extsearchidx: do not short-circuit MiscIdx on no-op v2 prepare Date: Mon, 23 Nov 2020 07:06:00 +0000 Message-Id: <20201123070602.9698-11-e@80x24.org> In-Reply-To: <20201123070602.9698-1-e@80x24.org> References: <20201123070602.9698-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This was intended to make development easier; but also allows us description, URL, and address changes to be picked up independently of message history. --- lib/PublicInbox/ExtSearchIdx.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index 890ac282..2cdc31cb 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -298,7 +298,7 @@ sub _sync_inbox ($$$) { my $epoch_max; defined($ibx->git_dir_latest(\$epoch_max)) or return; $sync->{epoch_max} = $epoch_max; - sync_prepare($self, $sync) or return; # fills $sync->{todo} + sync_prepare($self, $sync); # or return # TODO: once MiscIdx is stable } elsif ($v == 1) { my $uv = $ibx->uidvalidity; my $lc = $self->{oidx}->eidx_meta("lc-v1:$ekey//$uv"); @@ -309,8 +309,10 @@ sub _sync_inbox ($$$) { warn "E: $ekey unsupported inbox version (v$v)\n"; return; } - index_todo($self, $sync, $_) for @{delete($sync->{todo}) // []}; - $self->{midx}->index_ibx($ibx); + unless ($sync->{quit}) { + index_todo($self, $sync, $_) for @{delete($sync->{todo}) // []}; + $self->{midx}->index_ibx($ibx) unless $sync->{quit}; + } $ibx->git->cleanup; # done with this inbox, now }