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 2CC031F9F6 for ; Sat, 15 Jun 2019 08:47:40 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 20/20] comments: replace "partition" with "shard" Date: Sat, 15 Jun 2019 08:47:16 +0000 Message-Id: <20190615084716.3075-21-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: Now that the code matches Xapian terminology, ensure our comments match, too. --- lib/PublicInbox/SearchIdx.pm | 2 +- lib/PublicInbox/V2Writable.pm | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index 58b2337..665f673 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -797,7 +797,7 @@ sub remote_close { sub remote_remove { my ($self, $oid, $mid) = @_; if (my $w = $self->{w}) { - # triggers remove_by_oid in a partition + # triggers remove_by_oid in a shard print $w "D $oid $mid\n" or die "failed to write remove $!"; } else { $self->begin_txn_lazy; diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 7a89093..2b3ffa6 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -24,7 +24,7 @@ use IO::Handle; my $PACKING_FACTOR = 0.4; # SATA storage lags behind what CPUs are capable of, so relying on -# nproc(1) can be misleading and having extra Xapian partions is a +# nproc(1) can be misleading and having extra Xapian shards is a # waste of FDs and space. It can also lead to excessive IO latency # and slow things down. Users on NVME or other fast storage can # use the NPROC env or switches in our script/public-inbox-* programs @@ -57,7 +57,7 @@ sub count_shards ($) { my $n = 0; my $xpfx = $self->{xpfx}; - # always load existing partitions in case core count changes: + # always load existing shards in case core count changes: # Also, shard count may change while -watch is running # due to "xcpdb --reshard" if (-d $xpfx) { @@ -292,7 +292,7 @@ sub idx_init { $self->{shards} = $nshards; } - # need to create all parts before initializing msgmap FD + # need to create all shards before initializing msgmap FD my $max = $self->{shards} - 1; # idx_shards must be visible to all forked processes @@ -616,17 +616,17 @@ sub checkpoint ($;$) { if ($wait) { my $barrier = $self->barrier_init(scalar @$shards); - # each partition needs to issue a barrier command + # each shard needs to issue a barrier command $_->remote_barrier for @$shards; - # wait for each Xapian partition + # wait for each Xapian shard $self->barrier_wait($barrier); } else { $_->remote_commit for @$shards; } # last_commit is special, don't commit these until - # remote partitions are done: + # remote shards are done: $dbh->begin_work; set_last_commits($self); $dbh->commit; -- EW