about summary refs log tree commit homepage
path: root/script
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-13 00:29:37 +0000
committerEric Wong <e@80x24.org>2019-06-14 01:31:25 +0000
commite9eb3af852778a67533e9579b14695763535d262 (patch)
tree09478c84234a4a7f99def3bbae8f4f7e19c390fe /script
parente665a4fa317bf9ceea812bc9ca3f486ec722dfea (diff)
downloadpublic-inbox-e9eb3af852778a67533e9579b14695763535d262.tar.gz
v2 repos are sometimes created on machines where CPU
parallelization exceeds the capability of the storage devices.

In that case, users may reshard the Xapian DB to any smaller,
positive integer to avoid excessive overhead and contention when
bottlenecked by slow storage.

Resharding can also be used to increase shard count after
hardware upgrades.
Diffstat (limited to 'script')
-rwxr-xr-xscript/public-inbox-xcpdb4
1 files changed, 2 insertions, 2 deletions
diff --git a/script/public-inbox-xcpdb b/script/public-inbox-xcpdb
index ef64e58f..b41c683b 100755
--- a/script/public-inbox-xcpdb
+++ b/script/public-inbox-xcpdb
@@ -9,8 +9,8 @@ use PublicInbox::Admin;
 PublicInbox::Admin::require_or_die('-search');
 my $usage = "Usage: public-inbox-xcpdb [--compact] INBOX_DIR\n";
 my $opt = {};
-GetOptions($opt, qw(compact), @PublicInbox::Xapcmd::COMPACT_OPT) or
-        die "bad command-line args\n$usage";
+my @opt = (qw(compact reshard|R=i), @PublicInbox::Xapcmd::COMPACT_OPT);
+GetOptions($opt, @opt) or die "bad command-line args\n$usage";
 my @ibxs = PublicInbox::Admin::resolve_inboxes(\@ARGV) or die $usage;
 foreach (@ibxs) {
         my $ibx = PublicInbox::InboxWritable->new($_);