about summary refs log tree commit homepage
path: root/lib/PublicInbox/InboxWritable.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-23 08:38:47 +0000
committerEric Wong <e@80x24.org>2020-12-23 23:46:39 +0000
commit361cdfd0ae67d52d8a589b4ddc6e7fa94d8a9c8d (patch)
treebb68000186172735e504fbc43318a5d4caf10711 /lib/PublicInbox/InboxWritable.pm
parentfbc71f023f2356b2e88a8cfeb738a945085ac9a2 (diff)
downloadpublic-inbox-361cdfd0ae67d52d8a589b4ddc6e7fa94d8a9c8d.tar.gz
This ensures we have UIDVALIDITY to index earlier
rather than later for v1 inboxes, matching v2 behavior.
Diffstat (limited to 'lib/PublicInbox/InboxWritable.pm')
-rw-r--r--lib/PublicInbox/InboxWritable.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/InboxWritable.pm b/lib/PublicInbox/InboxWritable.pm
index c0e88f3d..69275bb0 100644
--- a/lib/PublicInbox/InboxWritable.pm
+++ b/lib/PublicInbox/InboxWritable.pm
@@ -46,12 +46,13 @@ sub _init_v1 {
                 require PublicInbox::Msgmap;
                 my $sidx = PublicInbox::SearchIdx->new($self, 1); # just create
                 $sidx->begin_txn_lazy;
+                my $mm = PublicInbox::Msgmap->new($self->{inboxdir}, 1);
                 if (defined $skip_artnum) {
-                        my $mm = PublicInbox::Msgmap->new($self->{inboxdir}, 1);
                         $mm->{dbh}->begin_work;
                         $mm->skip_artnum($skip_artnum);
                         $mm->{dbh}->commit;
                 }
+                undef $mm; # ->created_at set
                 $sidx->commit_txn_lazy;
         } else {
                 open my $fh, '>>', "$self->{inboxdir}/ssoma.lock" or