From: Eric Wong (Contractor, The Linux Foundation) Date: Mon, 26 Mar 2018 18:19:31 +0000 (+0000) Subject: searchidx: warn about vivifying multiple ghosts X-Git-Tag: v1.1.0-pre1~123 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=2f5bb422a75f38e9c2fdca5d526fd8832ca9de45 searchidx: warn about vivifying multiple ghosts This should help us detect bugs sooner in case we have space waste problems. --- diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index 7ac16ec2..446cfb0d 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -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);