From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id CCC9C1F97E for ; Sat, 15 Jun 2019 08:47:16 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 03/20] admin|xapcmd: user-facing messages say "shard" Date: Sat, 15 Jun 2019 08:46:59 +0000 Message-Id: <20190615084716.3075-4-e@80x24.org> In-Reply-To: <20190615084716.3075-1-e@80x24.org> References: <20190615084716.3075-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We're slowly getting rid of the word "partition" when it comes to remain consistent with Xapian docs. --- lib/PublicInbox/Admin.pm | 2 +- lib/PublicInbox/Xapcmd.pm | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/PublicInbox/Admin.pm b/lib/PublicInbox/Admin.pm index 8a2f204..5549b85 100644 --- a/lib/PublicInbox/Admin.pm +++ b/lib/PublicInbox/Admin.pm @@ -207,7 +207,7 @@ sub index_inbox { my $n = $v2w->{partitions}; if ($jobs != ($n + 1)) { warn -"Unable to respect --jobs=$jobs, inbox was created with $n partitions\n"; +"Unable to respect --jobs=$jobs, inbox was created with $n shards\n"; } } } diff --git a/lib/PublicInbox/Xapcmd.pm b/lib/PublicInbox/Xapcmd.pm index e1c6fe3..e303da9 100644 --- a/lib/PublicInbox/Xapcmd.pm +++ b/lib/PublicInbox/Xapcmd.pm @@ -68,11 +68,11 @@ sub commit_changes ($$$) { my $n = $im->count_partitions; if (defined $new_parts && $n != $new_parts) { die -"BUG: counted $n partitions after repartioning to $new_parts"; +"BUG: counted $n shards after resharding to $new_parts"; } my $prev = $im->{partitions}; if ($pr && $prev != $n) { - $pr->("partition count changed: $prev => $n\n"); + $pr->("shard count changed: $prev => $n\n"); $im->{partitions} = $n; } } @@ -177,7 +177,7 @@ sub run { } # we want temporary directories to be as deep as possible, - # so v2 partitions can keep "xap$SCHEMA_VERSION" on a separate FS. + # so v2 shards can keep "xap$SCHEMA_VERSION" on a separate FS. if ($v == 1) { if (defined $new_parts) { warn @@ -355,9 +355,9 @@ sub cpdb ($$) { if (ref($old) eq 'ARRAY') { ($cur_part) = ($new =~ m!xap[0-9]+/([0-9]+)\b!); defined $cur_part or - die "BUG: could not extract partition # from $new"; + die "BUG: could not extract shard # from $new"; $new_parts = $opt->{reshard}; - defined $new_parts or die 'BUG: got array src w/o --partition'; + defined $new_parts or die 'BUG: got array src w/o --reshard'; # repartitioning, M:N copy means have full read access foreach (@$old) { -- EW