This prevents unnecessary message renumbering and I/O.
Without this change, there is a small window for long-running
WWW streaming requests to miss a message that was unref-ed
before reindexing. If we expose an "All Mail" mailbox via
IMAP/JMAP, this will save client traffic.
$idx->ipc_do('add_eidx_info', $docid, $eidx_key, $eml);
apply_boost($req, $smsg) if $req->{boost_in_use};
} else { # 'd' no {xnum}
$idx->ipc_do('add_eidx_info', $docid, $eidx_key, $eml);
apply_boost($req, $smsg) if $req->{boost_in_use};
} else { # 'd' no {xnum}
+ $self->git->async_wait_all;
$oid = pack('H*', $oid);
_unref_doc($req, $docid, $xibx, undef, $oid, $eml);
}
$oid = pack('H*', $oid);
_unref_doc($req, $docid, $xibx, undef, $oid, $eml);
}
# xnum and ibx are unknown, we only call this when an entry from
# /ei*/over.sqlite3 is bad, not on entries from xap*/over.sqlite3
my $oidbin = pack('H*', $smsg->{blob});
# xnum and ibx are unknown, we only call this when an entry from
# /ei*/over.sqlite3 is bad, not on entries from xap*/over.sqlite3
my $oidbin = pack('H*', $smsg->{blob});
+ $req->{self}->git->async_wait_all;
_unref_doc($req, $smsg, undef, undef, $oidbin);
}
_unref_doc($req, $smsg, undef, undef, $oidbin);
}
}
return if $nr == 1; # likely, all good
}
return if $nr == 1; # likely, all good
+ $self->git->async_wait_all;
warn "W: #$docid split into $nr due to deduplication change\n";
my @todo;
for my $ary (values %$by_chash) {
warn "W: #$docid split into $nr due to deduplication change\n";
my @todo;
for my $ary (values %$by_chash) {
}
return if $sync->{quit};
next unless scalar keys %x3m;
}
return if $sync->{quit};
next unless scalar keys %x3m;
+ $self->git->async_wait_all; # wait for reindex_unseen
# eliminate stale/mismatched entries
my %mismatch = map { $_->{num} => $_->{blob} } @$msgs;
# eliminate stale/mismatched entries
my %mismatch = map { $_->{num} => $_->{blob} } @$msgs;