sub count_shards ($) {
my ($self) = @_;
+ # always load existing shards in case core count changes:
+ # Also, shard count may change while -watch is running
if (my $ibx = $self->{ibx}) {
- # always load existing shards in case core count changes:
- # Also, shard count may change while -watch is running
my $srch = $ibx->search or return 0;
delete $ibx->{search};
$srch->{nshard} // 0
} else { # ExtSearchIdx
- $self->{nshard} ||= scalar($self->xdb_shards_flat);
+ $self->{nshard} = scalar($self->xdb_shards_flat);
}
}
sub xapian_only {
my ($self, $opt, $sync, $art_beg) = @_;
- my $seq = $opt->{sequential_shard};
+ my $seq = $opt->{'sequential-shard'};
$art_beg //= 0;
local $self->{parallel} = 0 if $seq;
$self->idx_init($opt); # acquire lock
}
my $pr = $opt->{-progress};
- my $seq = $opt->{sequential_shard};
+ my $seq = $opt->{'sequential-shard'};
my $art_beg; # the NNTP article number we start xapian_only at
my $idxlevel = $self->{ibx}->{indexlevel};
local $self->{ibx}->{indexlevel} = 'basic' if $seq;