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-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,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 6DAEF1FA02 for ; Fri, 7 Aug 2020 10:52:19 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/5] index: --compact respects --sequential-shard Date: Fri, 7 Aug 2020 10:52:15 +0000 Message-Id: <20200807105218.16843-3-e@yhbt.net> In-Reply-To: <20200807105218.16843-1-e@yhbt.net> References: <20200807105218.16843-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Since the --compact switch works on Xapian shards, it makes sense that --sequential-shard affects our usage of xapian-compact(1). --- script/public-inbox-index | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/script/public-inbox-index b/script/public-inbox-index index dc9bdde1..56df5bfe 100755 --- a/script/public-inbox-index +++ b/script/public-inbox-index @@ -83,5 +83,8 @@ EOL $ibx_opt = { %$opt, sequentialshard => $v }; } PublicInbox::Admin::index_inbox($ibx, undef, $ibx_opt); - PublicInbox::Xapcmd::run($ibx, 'compact', $compact_opt) if $compact_opt; + if ($compact_opt) { + local $compact_opt->{jobs} = 0 if $ibx_opt->{sequentialshard}; + PublicInbox::Xapcmd::run($ibx, 'compact', $compact_opt); + } }