From 2f5bb422a75f38e9c2fdca5d526fd8832ca9de45 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Mon, 26 Mar 2018 18:19:31 +0000 Subject: [PATCH] searchidx: warn about vivifying multiple ghosts This should help us detect bugs sooner in case we have space waste problems. --- lib/PublicInbox/SearchIdx.pm | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.44.0