about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-07 07:40:53 +0000
committerEric Wong <e@80x24.org>2020-12-08 07:19:32 +0000
commit77b96aee09b2711e645ea2b04ab912b5e3285c73 (patch)
tree4c2c3c0d8d3ac05f93d645804cf1eadf10359747
parenta9d492511697f64e495dc48d0eb29c20f9fe590c (diff)
downloadpublic-inbox-77b96aee09b2711e645ea2b04ab912b5e3285c73.tar.gz
This improves consistency with sibling methods such as
->shard_remove_eidx_info and ->add_xref3.  Passing the
$eidx_key scalar is preferable to the entire $ibx object
for IPC-friendliness.
-rw-r--r--lib/PublicInbox/ExtSearchIdx.pm2
-rw-r--r--lib/PublicInbox/SearchIdxShard.pm3
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm
index c06b25a9..c82d1633 100644
--- a/lib/PublicInbox/ExtSearchIdx.pm
+++ b/lib/PublicInbox/ExtSearchIdx.pm
@@ -125,7 +125,7 @@ sub do_xpost ($$) {
         if (my $new_smsg = $req->{new_smsg}) { # 'm' on cross-posted message
                 my $xnum = $req->{xnum};
                 $self->{oidx}->add_xref3($docid, $xnum, $oid, $eidx_key);
-                $idx->shard_add_eidx_info($docid, $xibx, $eml);
+                $idx->shard_add_eidx_info($docid, $eidx_key, $eml);
                 check_batch_limit($req);
         } else { # 'd'
                 my $rm_eidx_info;
diff --git a/lib/PublicInbox/SearchIdxShard.pm b/lib/PublicInbox/SearchIdxShard.pm
index 182bbde2..579ed196 100644
--- a/lib/PublicInbox/SearchIdxShard.pm
+++ b/lib/PublicInbox/SearchIdxShard.pm
@@ -144,8 +144,7 @@ sub index_raw {
 }
 
 sub shard_add_eidx_info {
-        my ($self, $docid, $xibx, $eml) = @_;
-        my $eidx_key = $xibx->eidx_key;
+        my ($self, $docid, $eidx_key, $eml) = @_;
         if (my $w = $self->{w}) {
                 my $hdr = $eml->header_obj->as_string;
                 my $len = length($hdr);