From 323d8bac125e89a76c904a54a7ae0b2e36f05cc6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 3 Jan 2021 02:06:14 +0000 Subject: searchidxshard: replace index_raw with index_eml Since Storable and Sereal are designed for lossless serialization, we'll just pass $eml objects to whatever process is running SearchIdx. --- lib/PublicInbox/SearchIdxShard.pm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lib/PublicInbox/SearchIdxShard.pm') diff --git a/lib/PublicInbox/SearchIdxShard.pm b/lib/PublicInbox/SearchIdxShard.pm index 43dad959..83cbbb25 100644 --- a/lib/PublicInbox/SearchIdxShard.pm +++ b/lib/PublicInbox/SearchIdxShard.pm @@ -43,13 +43,8 @@ sub ipc_atfork_child { # called automatically before ipc_worker_loop PublicInbox::OnDestroy->new($$, \&_worker_done, $self); } -sub index_raw { - my ($self, $msgref, $eml, $smsg, $eidx_key) = @_; - if ($eml) { - undef($$msgref) if $msgref; - } else { # --xapian-only + --sequential-shard: - $eml = PublicInbox::Eml->new($msgref); - } +sub index_eml { + my ($self, $eml, $smsg, $eidx_key) = @_; $smsg->{eidx_key} = $eidx_key if defined $eidx_key; $self->ipc_do('add_message', $eml, $smsg); } -- cgit v1.2.3-24-ge0c7