sub partition_worker_loop ($$$$) {
my ($self, $r, $part, $bnote) = @_;
$0 = "pi-v2-partition[$part]";
+ my $current_info = '';
+ my $warn_cb = $SIG{__WARN__} || sub { print STDERR @_ };
+ local $SIG{__WARN__} = sub {
+ chomp $current_info;
+ $warn_cb->("[$part] $current_info: ", @_);
+ };
$self->begin_txn_lazy;
while (my $line = $r->getline) {
+ $current_info = $line;
if ($line eq "commit\n") {
$self->commit_txn_lazy;
} elsif ($line eq "close\n") {
im => undef, # PublicInbox::Import
parallel => 1,
transact_bytes => 0,
+ current_info => '',
xpfx => $xpfx,
over => PublicInbox::OverIdx->new("$xpfx/over.sqlite3", 1),
lock_path => "$dir/inbox.lock",
my $fh = $self->{reindex_pipe} = $git->popen(@cmd, $range);
my $cmt;
while (<$fh>) {
+ chomp;
+ $self->{current_info} = "$i.git $_";
if (/\A$x40$/o && !defined($cmt)) {
- chomp($cmt = $_);
+ $cmt = $_;
} elsif (/\A:\d{6} 100644 $x40 ($x40) [AM]\tm$/o) {
$self->reindex_oid($mm_tmp, $D, $git, $1,
$regen, $reindex);
}
}
}
+ local $SIG{__WARN__} = sub {
+ print STDERR $v2w->{current_info}, ': ', @_;
+ };
$v2w->index_sync({ reindex => $reindex, prune => $prune });
} else {
my $s = PublicInbox::SearchIdx->new($repo, 1);
}
{
- my @warn;
my $x = 'x'x250;
my $y = 'y'x250;
- local $SIG{__WARN__} = sub { push @warn, @_ };
+ local $SIG{__WARN__} = sub {};
$mime->header_set('Subject', 'long mid');
$mime->header_set('Message-ID', "<$x>");
ok($im->add($mime), 'add excessively long Message-ID');