about summary refs log tree commit homepage
path: root/script/public-inbox-xcpdb
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-07-24 05:56:02 +0000
committerEric Wong <e@yhbt.net>2020-07-25 20:48:18 +0000
commit0e68dbad3dc5e3fbc44e8ba8be576b81455d3359 (patch)
treedfe57fccc97fdf43ce68f3ae6f5cc804a00520df /script/public-inbox-xcpdb
parentde8e1586d732ae6c09a92588a8e4d442aedbff37 (diff)
downloadpublic-inbox-0e68dbad3dc5e3fbc44e8ba8be576b81455d3359.tar.gz
This allows us to speed up indexing operations to SQLite
and Xapian.

Unfortunately, it doesn't affect operations using
`xapian-compact' and the compactor API, since that doesn't seem
to support Xapian::DB_NO_SYNC, yet.
Diffstat (limited to 'script/public-inbox-xcpdb')
-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 2b9f032c..fcd96148 100755
--- a/script/public-inbox-xcpdb
+++ b/script/public-inbox-xcpdb
@@ -8,8 +8,8 @@ use PublicInbox::Xapcmd;
 use PublicInbox::Admin;
 PublicInbox::Admin::require_or_die('-search');
 my $usage = "Usage: public-inbox-xcpdb [--compact] INBOX_DIR\n";
-my $opt = {};
-my @opt = (qw(compact reshard|R=i), @PublicInbox::Xapcmd::COMPACT_OPT);
+my $opt = { sync => 1 };
+my @opt = (qw(sync! 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) {