diff options
author | Eric Wong <e@80x24.org> | 2020-12-23 08:38:47 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-12-23 23:46:39 +0000 |
commit | 361cdfd0ae67d52d8a589b4ddc6e7fa94d8a9c8d (patch) | |
tree | bb68000186172735e504fbc43318a5d4caf10711 /lib/PublicInbox/InboxWritable.pm | |
parent | fbc71f023f2356b2e88a8cfeb738a945085ac9a2 (diff) | |
download | public-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.pm | 3 |
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 |