We can't pass $self and GLOBs across IPC channels transparently.
I only noticed this because I'm testing the application/octet-stream
fallback with https://public-inbox.org/meta/[email protected]/
Fixes: bf8df8160076d7a1 ("searchidxshard: use PublicInbox::IPC to kill lots of
code")
---
lib/PublicInbox/V2Writable.pm | 2 +-
t/v2reindex.t | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm
index cbd4f003..03590850 100644
--- a/lib/PublicInbox/V2Writable.pm
+++ b/lib/PublicInbox/V2Writable.pm
@@ -1216,7 +1216,7 @@ sub sync_ranges ($$) {
sub index_xap_only { # git->cat_async callback
my ($bref, $oid, $type, $size, $smsg) = @_;
- my $self = $smsg->{self};
+ my $self = delete $smsg->{self};
my $idx = idx_shard($self, $smsg->{num});
$idx->index_eml(PublicInbox::Eml->new($bref), $smsg);
$self->{transact_bytes} += $smsg->{bytes};
diff --git a/t/v2reindex.t b/t/v2reindex.t
index 05ea952f..56540c8b 100644
--- a/t/v2reindex.t
+++ b/t/v2reindex.t
@@ -543,4 +543,9 @@ EOF
$check_rethread->('3-headed-monster once');
$check_rethread->('3-headed-monster twice');
+my $rdr = { 2 => \(my $err = '') };
+ok(run_script([qw(-index --reindex --xapian-only), $inboxdir], undef, $rdr),
+ '--xapian-only works');
+is($err, '', 'no errors from --xapian-only');
+
done_testing();
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/