We also have the idea of active inboxes, too, so "active shards"
ought to make the purpose of the data structure more obvious.
SELECT MIN(num) FROM over WHERE num > 0
EOM
$cur // return; # empty
SELECT MIN(num) FROM over WHERE num > 0
EOM
$cur // return; # empty
+ my ($r, $n, %active_shards);
$nr = 0;
while (1) {
$r = $self->{oidx}->dbh->selectcol_arrayref(<<"", undef, $cur);
$nr = 0;
while (1) {
$r = $self->{oidx}->dbh->selectcol_arrayref(<<"", undef, $cur);
for my $i ($cur..($n - 1)) {
my $idx = idx_shard($self, $i);
$idx->ipc_do('xdb_remove_quiet', $i);
for my $i ($cur..($n - 1)) {
my $idx = idx_shard($self, $i);
$idx->ipc_do('xdb_remove_quiet', $i);
+ $active_shards{$idx} = $idx;
}
$cur = $n + 1;
}
if (checkpoint_due($sync)) {
}
$cur = $n + 1;
}
if (checkpoint_due($sync)) {
- for my $idx (values %active) {
+ for my $idx (values %active_shards) {
$nr += $idx->ipc_do('nr_quiet_rm')
}
$nr += $idx->ipc_do('nr_quiet_rm')
}
reindex_checkpoint($self, $sync);
}
}
reindex_checkpoint($self, $sync);
}
}