]> Sergey Matveev's repositories - public-inbox.git/commitdiff
searchidx: fix fallback on unindex miss
authorEric Wong <e@80x24.org>
Tue, 10 Nov 2020 03:20:29 +0000 (03:20 +0000)
committerEric Wong <e@80x24.org>
Tue, 10 Nov 2020 18:15:12 +0000 (18:15 +0000)
In case of other bugs or intentional corruption of over.sqlite3,
we don't want to attempt dereferencing a non-ref scalar when
calling ->mid_delete in the fallback code path.

Noticed while chasing another bug in extindex development...

lib/PublicInbox/SearchIdx.pm

index 06d1a9f580dfe35b436d39ae8327e211f9f110c1..662055c6595fcbcdb156253356612ee6e4a353fc 100644 (file)
@@ -554,8 +554,8 @@ sub unindex_eml {
                $tmp{$_}++ for @removed;
        }
        if (!$nr) {
-               $mids = join('> <', @$mids);
-               warn "W: <$mids> missing for removal from overview\n";
+               my $m = join('> <', @$mids);
+               warn "W: <$m> missing for removal from overview\n";
        }
        while (my ($num, $nr) = each %tmp) {
                warn "BUG: $num appears >1 times ($nr) for $oid\n" if $nr != 1;