]> Sergey Matveev's repositories - public-inbox.git/commitdiff
searchidx: warn about vivifying multiple ghosts
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Mon, 26 Mar 2018 18:19:31 +0000 (18:19 +0000)
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Tue, 27 Mar 2018 02:34:25 +0000 (02:34 +0000)
This should help us detect bugs sooner in case we have
space waste problems.

lib/PublicInbox/SearchIdx.pm

index 7ac16ec283bf6c059c2f7ac14a12706da5f6f319..446cfb0d50afd8be723a24c4f6f5751de80ba548 100644 (file)
@@ -561,6 +561,10 @@ sub link_and_save {
                        1;
                });
        }
+       if ($vivified > 1) {
+               my $id = '<'.join('> <', @$mids).'>';
+               warn "BUG: vivified multiple ($vivified) ghosts for $id\n";
+       }
        # not really important, but we return any vivified ghost docid, here:
        return $doc_id if defined $doc_id;
        link_doc($self, $doc, $refs, $old_tid);