]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
drop unused CidxRecvIbx.pm
authorEric Wong <e@80x24.org>
Thu, 24 Aug 2023 12:30:20 +0000 (12:30 +0000)
committerEric Wong <e@80x24.org>
Thu, 24 Aug 2023 21:53:11 +0000 (21:53 +0000)
This is no longer needed since xap_helper performs its
functionality while having an optional C++ implementation
which is being significantly faster.

MANIFEST
lib/PublicInbox/CidxRecvIbx.pm [deleted file]

index 4bccc8493cc076fa9a8d22a6e5ee76280d4b344e..918ec2e1f430a7f02c9a8cf68a53ee6b07374ec1 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -163,7 +163,6 @@ lib/PublicInbox/AutoReap.pm
 lib/PublicInbox/Cgit.pm
 lib/PublicInbox/CidxComm.pm
 lib/PublicInbox/CidxLogP.pm
-lib/PublicInbox/CidxRecvIbx.pm
 lib/PublicInbox/CidxXapHelperAux.pm
 lib/PublicInbox/CmdIPC4.pm
 lib/PublicInbox/CodeSearch.pm
diff --git a/lib/PublicInbox/CidxRecvIbx.pm b/lib/PublicInbox/CidxRecvIbx.pm
deleted file mode 100644 (file)
index 6add8e5..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright (C) all contributors <meta@public-inbox.org>
-# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
-#
-# dumps all per-inbox info for -cindex --associate
-# integrated into the event loop for signalfd SIGINT handling
-package PublicInbox::CidxRecvIbx;
-use v5.12;
-use parent qw(PublicInbox::DS);
-use PublicInbox::Syscall qw(EPOLLIN EPOLLEXCLUSIVE);
-use Socket qw(MSG_EOR);
-use PublicInbox::CidxDumpIbx;
-
-sub new {
-       my ($cls, $cidx, $qry_str) = @_;
-       my ($op_p, $r_ibx, $sort_w) = delete @$cidx{0..2};
-       $op_p // die 'BUG: no $op_p';
-       $r_ibx // die 'BUG: no $r_ibx';
-       $sort_w // die 'BUG: no $sort_w';
-       my $self = bless {}, $cls;
-       $self->SUPER::new($r_ibx, EPOLLIN|EPOLLEXCLUSIVE);
-       $self->{cidx} = $cidx;
-       $self->{sort_w} = $sort_w;
-       $self->{op_p} = $op_p; # PublicInbox::CidxDumpIbx uses this
-       $self->{qry_str} = $qry_str;
-       # writes to this pipe are never longer than POSIX PIPE_BUF,
-       # so rely on POSIX atomicity guarantees
-       $sort_w->autoflush(1);
-       $self;
-}
-
-sub event_step {
-       my ($self) = @_;
-       recv($self->{sock}, my $ibx_id, 25, 0) // die "recv: $!";
-       return $self->close if $ibx_id eq '' || $self->{cidx}->do_quit;
-       PublicInbox::CidxDumpIbx::start($self, $ibx_id);
-}
-
-sub close {
-       my ($self) = @_;
-       $self->{cidx}->do_quit or
-               send($self->{op_p},
-                       "recv_ibx_done $self->{cidx}->{shard}", MSG_EOR);
-       $self->SUPER::close; # PublicInbox::DS::close
-}
-
-1;