diff options
author | Eric Wong <e@80x24.org> | 2021-09-19 12:50:23 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-19 19:52:46 +0000 |
commit | 7df294d19a7d8b2a35532375e75c8a879840dd04 (patch) | |
tree | 0182cdeab3849d35d463eba47b5a87184e6d6b3b /lib/PublicInbox/LeiStore.pm | |
parent | cbc2890cb89b81cb6b9e8fabf3f196d9a6110dce (diff) | |
download | public-inbox-7df294d19a7d8b2a35532375e75c8a879840dd04.tar.gz |
With the switch from pipes to sockets for lei-daemon => lei/store IPC, we can send the script/lei client socket to the lei/store process and rely on reference counting in both Perl and the kernel to persist the script/lei.
Diffstat (limited to 'lib/PublicInbox/LeiStore.pm')
-rw-r--r-- | lib/PublicInbox/LeiStore.pm | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm index 4ec63699..164a9f2d 100644 --- a/lib/PublicInbox/LeiStore.pm +++ b/lib/PublicInbox/LeiStore.pm @@ -534,10 +534,6 @@ sub done { $self->{priv_eidx}->done; # V2Writable::done xchg_stderr($self); die $err if $err; - - # notify clients ->done has been issued - defined($sock_ref) and - $self->{s2d_op_p}->pkt_do('sto_done_complete', $sock_ref); } sub ipc_atfork_child { @@ -562,9 +558,6 @@ sub write_prepare { my ($self, $lei) = @_; $lei // die 'BUG: $lei not passed'; unless ($self->{-ipc_req}) { - # s2d => store-to-daemon messages - require PublicInbox::PktOp; - my ($s2d_op_c, $s2d_op_p) = PublicInbox::PktOp->pair; my $dir = $lei->store_path; substr($dir, -length('/lei/store'), 10, ''); pipe(my ($r, $w)) or die "pipe: $!"; @@ -576,14 +569,10 @@ sub write_prepare { $self->wq_workers_start("lei/store $dir", 1, $lei->oldset, { lei => $lei, -err_wr => $w, - to_close => [ $r, $s2d_op_c->{sock} ], - s2d_op_p => $s2d_op_p, + to_close => [ $r ], }); require PublicInbox::LeiStoreErr; PublicInbox::LeiStoreErr->new($r, $lei); - $s2d_op_c->{ops} = { - sto_done_complete => [ $lei->can('sto_done_complete') ] - }; } $lei->{sto} = $self; } |