about summary refs log tree commit homepage
path: root/lib/PublicInbox/Xapcmd.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-14 17:38:01 +0000
committerEric Wong <e@80x24.org>2019-06-14 21:56:40 +0000
commit3f5370d63630701d0f62f57c15e08d566c35db42 (patch)
tree3db17b7683c917391042b9885955f35d25fa9b00 /lib/PublicInbox/Xapcmd.pm
parent0ffd4a9833da64006d558ef241badfef3c096d1b (diff)
downloadpublic-inbox-3f5370d63630701d0f62f57c15e08d566c35db42.tar.gz
Don't confuse future readers of our code.
Diffstat (limited to 'lib/PublicInbox/Xapcmd.pm')
-rw-r--r--lib/PublicInbox/Xapcmd.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/PublicInbox/Xapcmd.pm b/lib/PublicInbox/Xapcmd.pm
index 322d827a..5e4ac87e 100644
--- a/lib/PublicInbox/Xapcmd.pm
+++ b/lib/PublicInbox/Xapcmd.pm
@@ -40,7 +40,7 @@ sub commit_changes ($$$) {
                         $over = undef;
                 }
 
-                if (!defined($new)) { # culled partition
+                if (!defined($new)) { # culled shard
                         push @old_part, $old;
                         next;
                 }
@@ -359,7 +359,7 @@ sub cpdb ($$) {
                 $new_parts = $opt->{reshard};
                 defined $new_parts or die 'BUG: got array src w/o --reshard';
 
-                # repartitioning, M:N copy means have full read access
+                # resharding, M:N copy means have full read access
                 foreach (@$old) {
                         if ($src) {
                                 my $sub = Search::Xapian::Database->new($_);
@@ -397,7 +397,7 @@ sub cpdb ($$) {
                         my $lc = $src->get_metadata('last_commit');
                         $dst->set_metadata('last_commit', $lc) if $lc;
 
-                        # only the first xapian partition (0) gets 'indexlevel'
+                        # only the first xapian shard (0) gets 'indexlevel'
                         if ($new =~ m!(?:xapian[0-9]+|xap[0-9]+/0)\b!) {
                                 my $l = $src->get_metadata('indexlevel');
                                 if ($l eq 'medium') {
@@ -407,7 +407,7 @@ sub cpdb ($$) {
                         if ($pr_data) {
                                 my $tot = $src->get_doccount;
 
-                                # we can only estimate when repartitioning,
+                                # we can only estimate when resharding,
                                 # because removed spam causes slight imbalance
                                 my $est = '';
                                 if (defined $cur_part && $new_parts > 1) {
@@ -459,7 +459,7 @@ sub new {
         # http://www.tldp.org/LDP/abs/html/exitcodes.html
         $SIG{INT} = sub { exit(130) };
         $SIG{HUP} = $SIG{PIPE} = $SIG{TERM} = sub { exit(1) };
-        my $self = bless {}, $_[0]; # old partition => new (tmp) partition
+        my $self = bless {}, $_[0]; # old shard => new (WIP) shard
         $owner{"$self"} = $$;
         $self;
 }
@@ -481,7 +481,7 @@ sub DESTROY {
         my $owner_pid = delete $owner{"$self"} or return;
         return if $owner_pid != $$;
         foreach my $new (values %$self) {
-                defined $new or next; # may be undef if repartitioning
+                defined $new or next; # may be undef if resharding
                 remove_tree($new) unless -d "$new/old";
         }
         done($self);