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 862151F5AF for ; Sat, 27 Jun 2020 10:04:00 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 01/34] inboxwritable: ensure ssoma.lock exists on init Date: Sat, 27 Jun 2020 10:03:27 +0000 Message-Id: <20200627100400.9871-2-e@yhbt.net> In-Reply-To: <20200627100400.9871-1-e@yhbt.net> References: <20200627100400.9871-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This will allow us to use InboxIdle on empty/unindexed v1 inboxes. --- lib/PublicInbox/InboxWritable.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/PublicInbox/InboxWritable.pm b/lib/PublicInbox/InboxWritable.pm index f9e28502001..9bdf8637e6e 100644 --- a/lib/PublicInbox/InboxWritable.pm +++ b/lib/PublicInbox/InboxWritable.pm @@ -53,6 +53,9 @@ sub init_inbox { $mm->{dbh}->commit; }) if defined($skip_artnum); $sidx->commit_txn_lazy; + } else { + open my $fh, '>>', "$dir/ssoma.lock" or + die "$dir/ssoma.lock: $!\n"; } } else { my $v2w = importer($self);