From 0e68dbad3dc5e3fbc44e8ba8be576b81455d3359 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 24 Jul 2020 05:56:02 +0000 Subject: index+xcpdb: support --no-sync flag 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. --- script/public-inbox-xcpdb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'script/public-inbox-xcpdb') 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) { -- cgit v1.2.3-24-ge0c7