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/LEI.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/LEI.pm')
-rw-r--r-- | lib/PublicInbox/LEI.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 8b0614f2..549b855b 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -1501,9 +1501,9 @@ sub sto_done_request { # only call this from lei-daemon process (not workers) eval { if ($sock //= $lei->{sock}) { # issue, async wait $LIVE_SOCK{"$sock"} = $sock; - $lei->{sto}->ipc_do('done', "$sock"); + $lei->{sto}->wq_do('done', "$sock"); } else { # forcibly wait - my $wait = $lei->{sto}->ipc_do('done'); + my $wait = $lei->{sto}->wq_do('done'); } }; $lei->err($@) if $@; |