From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 5/5] shard_add_eidx_info: pass $eidx_key instead of $ibx object
Date: Mon, 7 Dec 2020 07:40:53 +0000 [thread overview]
Message-ID: <20201207074053.14483-6-e@80x24.org> (raw)
In-Reply-To: <20201207074053.14483-1-e@80x24.org>
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.
---
lib/PublicInbox/ExtSearchIdx.pm | 2 +-
lib/PublicInbox/SearchIdxShard.pm | 3 +--
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);
prev parent reply other threads:[~2020-12-07 7:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 7:40 [PATCH 0/5] extindex: random cleanups Eric Wong
2020-12-07 7:40 ` [PATCH 1/5] over: gracefully show invalid ibx_id Eric Wong
2020-12-07 7:40 ` [PATCH 2/5] overidx: wrap eidx_key => ibx_id mapping Eric Wong
2020-12-07 7:40 ` [PATCH 3/5] extsearchidx: remove needless SHA-1 check Eric Wong
2020-12-07 7:40 ` [PATCH 4/5] searchidx: remove $oid parameter from most calls Eric Wong
2020-12-07 7:40 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201207074053.14483-6-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).