From: Eric Wong Date: Tue, 16 Sep 2025 10:25:05 +0000 (+0000) Subject: extindex: fix --reindex when blobs go missing X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b37373b6e4efab044b3b1922168345e340719e11;p=thirdparty%2Fpublic-inbox.git 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. --- 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');