There's a bug in `lei import' introduced in
4ff8e8d21ab5
(lei/store: stop shard workers + cat-file on idle, 2024-04-16)
which causes {idx_shards} to not be recreated properly.
Hopefully this can help me track it down since it's not easily
reproducible.
sub idx_shard ($$) {
my ($self, $num) = @_;
+ use Carp qw(confess); # FIXME: lei_store bug somewhere..
+ confess 'BUG: {idx_shards} unset' if !$self->{idx_shards};
+ confess 'BUG: {idx_shards} empty' if !@{$self->{idx_shards}};
$self->{idx_shards}->[$num % scalar(@{$self->{idx_shards}})];
}