From d6beefee49df29165fcb720e645e6466b3155cc1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 13 Nov 2023 13:15:44 +0000 Subject: cindex: delay associate until prune+indexing finish Prune can get rid of invalid commits while indexing can add new candidates for association, so we don't dump coderepo roots for association until those are squared away. However, we can dump inbox info since we don't touch inboxes while -cindex is running. --- lib/PublicInbox/CidxComm.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/CidxComm.pm') diff --git a/lib/PublicInbox/CidxComm.pm b/lib/PublicInbox/CidxComm.pm index c7ab3c10..80a235e9 100644 --- a/lib/PublicInbox/CidxComm.pm +++ b/lib/PublicInbox/CidxComm.pm @@ -13,8 +13,8 @@ use parent qw(PublicInbox::DS); use PublicInbox::Syscall qw(EPOLLIN EPOLLONESHOT); sub new { - my ($cls, $rd, $cidx) = @_; - my $self = bless { cidx => $cidx }, $cls; + my ($cls, $rd, $cidx, $drs) = @_; + my $self = bless { cidx => $cidx, drs => $drs }, $cls; $self->SUPER::new($rd, EPOLLIN|EPOLLONESHOT); } @@ -22,7 +22,7 @@ sub event_step { my ($self) = @_; my $rd = $self->{sock} // return warn('BUG?: no {sock}'); $self->close; # EPOLL_CTL_DEL - delete($self->{cidx})->cidx_read_comm($rd); + delete($self->{cidx})->cidx_read_comm($rd, delete $self->{drs}); } 1; -- cgit v1.2.3-24-ge0c7