diff options
author | Eric Wong <e@80x24.org> | 2021-09-19 12:50:22 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-19 19:52:45 +0000 |
commit | cbc2890cb89b81cb6b9e8fabf3f196d9a6110dce (patch) | |
tree | 5e8fc56e04b6b52d28c5853aca1bb5f9b98f36b7 /lib/PublicInbox/LeiXSearch.pm | |
parent | 12775b5be53db1244b9cb32ae2ef90f105735e1b (diff) | |
download | public-inbox-cbc2890cb89b81cb6b9e8fabf3f196d9a6110dce.tar.gz |
This has several advantages: * no need to use ipc.lock to protect a pipe for non-atomic writes * ability to pass FDs. In another commit, this will let us simplify lei->sto_done_request and pass newly-created sockets to lei/store directly. disadvantages: - an extra pipe is required for rare messages over several hundred KB, this is probably a non-issue, though The performance delta is unknown, but I expect shards (which remain pipes) to be the primary bottleneck IPC-wise for lei/store.
Diffstat (limited to 'lib/PublicInbox/LeiXSearch.pm')
-rw-r--r-- | lib/PublicInbox/LeiXSearch.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm index 1d49da3d..4583b067 100644 --- a/lib/PublicInbox/LeiXSearch.pm +++ b/lib/PublicInbox/LeiXSearch.pm @@ -269,7 +269,7 @@ sub each_remote_eml { # callback for MboxReader->mboxrd my $xoids = $lei->{ale}->xoids_for($eml, 1); my $smsg = bless {}, 'PublicInbox::Smsg'; if ($self->{import_sto} && !$xoids) { - my $res = $self->{import_sto}->ipc_do('add_eml', $eml); + my $res = $self->{import_sto}->wq_do('add_eml', $eml); if (ref($res) eq ref($smsg)) { # totally new message $smsg = $res; $smsg->{kw} = []; # short-circuit xsmsg_vmd @@ -369,7 +369,7 @@ sub query_remote_mboxrd { @$reap_curl = (); # cancel OnDestroy die $err if $err; my $nr = $lei->{-nr_remote_eml}; - my $wait = $lei->{sto}->ipc_do('done') if $nr && $lei->{sto}; + my $wait = $lei->{sto}->wq_do('done') if $nr && $lei->{sto}; if ($? == 0) { # don't update if no results, maybe MTA is down $key && $nr and @@ -413,7 +413,7 @@ sub query_done { # EOF callback for main daemon warn "BUG: {sto} missing with --mail-sync"; } $lei->sto_done_request if $lei->{sto}; - my $wait = $lei->{v2w} ? $lei->{v2w}->ipc_do('done') : undef; + my $wait = $lei->{v2w} ? $lei->{v2w}->wq_do('done') : undef; $lei->{ovv}->ovv_end($lei); my $start_mua; if ($l2m) { # close() calls LeiToMail reap_compress |