]> Sergey Matveev's repositories - public-inbox.git/commitdiff
extsearchidx: do not short-circuit MiscIdx on no-op v2 prepare
authorEric Wong <e@80x24.org>
Mon, 23 Nov 2020 07:06:00 +0000 (07:06 +0000)
committerEric Wong <e@80x24.org>
Tue, 24 Nov 2020 05:03:55 +0000 (05:03 +0000)
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

index 890ac28283d27f1050e9e605743e95b0ec5d2e23..2cdc31cb885c839183af7e3b2847470b1d51e57b 100644 (file)
@@ -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
 }