From cbc2890cb89b81cb6b9e8fabf3f196d9a6110dce Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 19 Sep 2021 12:50:22 +0000 Subject: lei/store: use SOCK_SEQPACKET rather than pipe 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. --- lib/PublicInbox/LeiInput.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/LeiInput.pm') diff --git a/lib/PublicInbox/LeiInput.pm b/lib/PublicInbox/LeiInput.pm index fe736981..22bedba6 100644 --- a/lib/PublicInbox/LeiInput.pm +++ b/lib/PublicInbox/LeiInput.pm @@ -378,7 +378,7 @@ sub process_inputs { } # always commit first, even on error partial work is acceptable for # lei - my $wait = $self->{lei}->{sto}->ipc_do('done') if $self->{lei}->{sto}; + my $wait = $self->{lei}->{sto}->wq_do('done') if $self->{lei}->{sto}; $self->{lei}->fail($err) if $err; } -- cgit v1.2.3-24-ge0c7