From 537eb7ec8c0f8ebd6fa39807a08515ccd3c4be66 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Sun, 1 Apr 2018 23:23:07 +0000 Subject: v2writable: fix parallel termination I was too aggressively disabling parallelization to speed up the test suite and broke this :x Re-enable parallelization for the v2reindex test so we can catch it later. --- lib/PublicInbox/V2Writable.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox') diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index c8869bda..51723e55 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -204,9 +204,13 @@ sub idx_init { # need to create all parts before initializing msgmap FD my $max = $self->{partitions} - 1; - @{$self->{idx_parts}} = map { - PublicInbox::SearchIdxPart->new($self, $_, $skel); - } (0..$max); + + # idx_parts must be visible to all forked processes + my $idx = $self->{idx_parts} = []; + for my $i (0..$max) { + push @$idx, + PublicInbox::SearchIdxPart->new($self, $i, $skel); + } # Now that all subprocesses are up, we can open the FD for SQLite: $skel->_msgmap_init->{dbh}->begin_work; -- cgit v1.2.3-24-ge0c7