unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] searchidx: fix fallback on unindex miss
@ 2020-11-10  3:20 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2020-11-10  3:20 UTC (permalink / raw)
  To: meta

In case of other bugs or intentional corruption of over.sqlite3,
we don't want to attempt dereferencing a non-ref scalar when
calling ->mid_delete in the fallback code path.

Noticed while chasing another bug in extindex development...
---
 lib/PublicInbox/SearchIdx.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm
index 06d1a9f5..662055c6 100644
--- a/lib/PublicInbox/SearchIdx.pm
+++ b/lib/PublicInbox/SearchIdx.pm
@@ -554,8 +554,8 @@ sub unindex_eml {
 		$tmp{$_}++ for @removed;
 	}
 	if (!$nr) {
-		$mids = join('> <', @$mids);
-		warn "W: <$mids> missing for removal from overview\n";
+		my $m = join('> <', @$mids);
+		warn "W: <$m> missing for removal from overview\n";
 	}
 	while (my ($num, $nr) = each %tmp) {
 		warn "BUG: $num appears >1 times ($nr) for $oid\n" if $nr != 1;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-10  3:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10  3:20 [PATCH] searchidx: fix fallback on unindex miss Eric Wong

unofficial mirror of meta@public-inbox.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ https://yhetil.org/meta \
		meta@public-inbox.org
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.public-inbox.meta
	nntp://news.public-inbox.org/inbox.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git