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.
# need to create all parts before initializing msgmap FD
my $max = $self->{partitions} - 1;
# 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;
# Now that all subprocesses are up, we can open the FD for SQLite:
$skel->_msgmap_init->{dbh}->begin_work;
],
body => "hello world\n",
);
],
body => "hello world\n",
);
my $im = PublicInbox::V2Writable->new($ibx, 1);
my $im = PublicInbox::V2Writable->new($ibx, 1);
foreach my $i (1..10) {
$mime->header_set('Message-Id', "<$i\@example.com>");
ok($im->add($mime), "message $i added");
foreach my $i (1..10) {
$mime->header_set('Message-Id', "<$i\@example.com>");
ok($im->add($mime), "message $i added");