diff options
author | Eric Wong <e@80x24.org> | 2021-07-30 12:18:55 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-07-31 00:14:20 +0000 |
commit | dd80dcaa1e46543893de533938a1651639f91f10 (patch) | |
tree | 5adc2105b766957782d9d876f4c7914e9bf89c38 /lib/PublicInbox/V2Writable.pm | |
parent | b38ffe92ee5ccb5eb4e5892e8cafba85303cadfc (diff) | |
download | public-inbox-dd80dcaa1e46543893de533938a1651639f91f10.tar.gz |
Since extindex uses Xapian shards in a similar way to v2 inboxes, we'll support -xcpdb (reshard+upgrade) and -compact all the same to give admins tuning+upgrade options.
Diffstat (limited to 'lib/PublicInbox/V2Writable.pm')
-rw-r--r-- | lib/PublicInbox/V2Writable.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 025487d2..1288f47b 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -54,14 +54,14 @@ sub nproc_shards ($) { 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); } } |