From b37373b6e4efab044b3b1922168345e340719e11 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 16 Sep 2025 10:25:05 +0000 Subject: [PATCH] extindex: fix --reindex when blobs go missing Blobs in v2 repos may be purged, ensure we don't try to parse non-existent blobs for List-IDs to remove from Xapian when they go missing. The invalid List-IDs will be removed in a later stage of the reindex process. --- lib/PublicInbox/ExtSearchIdx.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index c60b6f43f..1e48facaa 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -225,7 +225,7 @@ sub _unref_doc ($$$$$;$) { if (scalar(@$xr3) == 0) { # all gone remove_doc($self, $docid); } else { # enqueue for reindex of remaining messages - if ($ibx && $self->{-need_xapian}) { + if ($eml && $ibx && $self->{-need_xapian}) { my $ekey = $ibx->{-gc_eidx_key} // $ibx->eidx_key; my $idx = $self->idx_shard($docid); my @list_ids = $eml->header_raw('List-Id'); -- 2.47.3