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,AWL,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 4BAFF1F990 for ; Thu, 6 Aug 2020 10:37:10 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] msgmap: tmp_clone: use MEMORY journal upon reconnect Date: Thu, 6 Aug 2020 10:37:10 +0000 Message-Id: <20200806103710.8631-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Since reindexing releases the DB handle every indexBatchSize bytes, we need to ensure we keep the journal in-memory when reopening the DB. --- lib/PublicInbox/Msgmap.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PublicInbox/Msgmap.pm b/lib/PublicInbox/Msgmap.pm index c85e7796..eee8d6ca 100644 --- a/lib/PublicInbox/Msgmap.pm +++ b/lib/PublicInbox/Msgmap.pm @@ -248,6 +248,7 @@ sub atfork_parent { $self->{dbh} and die 'BUG: tmp_clone dbh not prepared for parent'; defined($self->{filename}) or die 'BUG: {filename} not defined'; $self->{dbh} = PublicInbox::Over::dbh_new($self, 2); + $self->{dbh}->do('PRAGMA journal_mode = MEMORY'); } sub atfork_prepare {