unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] msgmap: tmp_clone: use MEMORY journal upon reconnect
@ 2020-08-06 10:37 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2020-08-06 10:37 UTC (permalink / raw)
  To: meta

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 {

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-06 10:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06 10:37 [PATCH] msgmap: tmp_clone: use MEMORY journal upon reconnect Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).