From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id B56581FAEB for ; Tue, 27 Mar 2018 11:11:34 +0000 (UTC) From: "Eric Wong (Contractor, The Linux Foundation)" To: meta@public-inbox.org Subject: [PATCH 07/11] searchidx: warn about vivifying multiple ghosts Date: Tue, 27 Mar 2018 11:11:28 +0000 Message-Id: <20180327111132.20681-8-e@80x24.org> In-Reply-To: <20180327111132.20681-1-e@80x24.org> References: <20180327111132.20681-1-e@80x24.org> List-Id: 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 7ac16ec..446cfb0 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); -- EW