about summary refs log tree commit homepage
path: root/lib/PublicInbox/V2Writable.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-14 07:56:58 +0000
committerEric Wong <e@80x24.org>2019-06-14 21:56:40 +0000
commit9b20aeef079c67ddaa2911b89f0b1209903d72fb (patch)
tree0a56192d6badc0071cb729fedf36c6013a0e7be3 /lib/PublicInbox/V2Writable.pm
parente48df4770cffd4ef9672a884ea827cbcf566e469 (diff)
downloadpublic-inbox-9b20aeef079c67ddaa2911b89f0b1209903d72fb.tar.gz
v2writable: count_partitions => count_shards
Another step towards becoming consistent with Xapian terminology
Diffstat (limited to 'lib/PublicInbox/V2Writable.pm')
-rw-r--r--lib/PublicInbox/V2Writable.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm
index db905f92..03e6e951 100644
--- a/lib/PublicInbox/V2Writable.pm
+++ b/lib/PublicInbox/V2Writable.pm
@@ -52,7 +52,7 @@ sub nproc_parts ($) {
         $n < 1 ? 1 : $n;
 }
 
-sub count_partitions ($) {
+sub count_shards ($) {
         my ($self) = @_;
         my $nparts = 0;
         my $xpfx = $self->{xpfx};
@@ -103,7 +103,7 @@ sub new {
                 rotate_bytes => int((1024 * 1024 * 1024) / $PACKING_FACTOR),
                 last_commit => [], # git repo -> commit
         };
-        $self->{partitions} = count_partitions($self) || nproc_parts($creat);
+        $self->{partitions} = count_shards($self) || nproc_parts($creat);
         bless $self, $class;
 }
 
@@ -289,7 +289,7 @@ sub idx_init {
                 $over->create;
 
                 # xcpdb can change shard count while -watch is idle
-                my $nparts = count_partitions($self);
+                my $nparts = count_shards($self);
                 if ($nparts && $nparts != $self->{partitions}) {
                         $self->{partitions} = $nparts;
                 }