about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-10-16 22:52:49 -1100
committerEric Wong <e@80x24.org>2021-10-17 19:04:48 +0000
commit9406144c54215626e79ee65fc3c89ff350506317 (patch)
tree4122c95b9d682ae63583c9110df176439945b4e4
parent1e077113dc88703c47a0164cc2bb2ff03c2a45a1 (diff)
downloadpublic-inbox-9406144c54215626e79ee65fc3c89ff350506317.tar.gz
I'm not sure if this is a bug or not (or it could be
an old bug in the v2 indexing code).
-rw-r--r--lib/PublicInbox/ExtSearchIdx.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm
index daff656d..cb5256a2 100644
--- a/lib/PublicInbox/ExtSearchIdx.pm
+++ b/lib/PublicInbox/ExtSearchIdx.pm
@@ -921,6 +921,16 @@ ibx_id = ? AND xnum >= ? AND xnum <= ?
                         my ($xnum, $hex) = unpack('JH*', $k);
                         my $bin = pack('H*', $hex);
                         my $exp = $mismatch{$xnum};
+                        if (defined $exp) {
+                                my $smsg = $ibx->over->get_art($xnum) // next;
+                                # $xnum may be expired by another process
+                                if ($smsg->{blob} eq $hex) {
+                                        warn <<"";
+BUG: (non-fatal) $ekey #$xnum $smsg->{blob} still matches (old exp: $exp)
+
+                                        next;
+                                } # else: continue to unref
+                        }
                         my $m = defined($exp) ? "mismatch (!= $exp)" : 'stale';
                         warn("# $xnum:$hex (#@$docids): $m\n");
                         for my $i (@$docids) {