X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FMsgmap.pm;h=f15875e37cd8a88c2b74956301892d4198be541f;hb=2b52961cb0e77fc1645cc91318e3518f883313a3;hp=5b4cebc105bd21c659b1182721323cbf881d381a;hpb=793dcb03635e167143c9df6897999f4698a5133c;p=public-inbox.git diff --git a/lib/PublicInbox/Msgmap.pm b/lib/PublicInbox/Msgmap.pm index 5b4cebc1..f15875e3 100644 --- a/lib/PublicInbox/Msgmap.pm +++ b/lib/PublicInbox/Msgmap.pm @@ -6,9 +6,10 @@ # numbers for NNTP and allows prefix lookups for partial Message-IDs # in case URLs get truncated from copy-n-paste errors by users. # -# This is maintained by ::SearchIdx +# This is maintained by ::SearchIdx (v1) and ::V2Writable (v2) package PublicInbox::Msgmap; use strict; +use v5.10.1; use DBI; use DBD::SQLite; use PublicInbox::Over; @@ -31,9 +32,6 @@ sub new_file { my $self = bless { filename => $f }, $class; my $dbh = $self->{dbh} = PublicInbox::Over::dbh_new($self, $rw); if ($rw) { - # TRUNCATE reduces I/O compared to the default (DELETE) - $dbh->do('PRAGMA journal_mode = TRUNCATE'); - $dbh->begin_work; create_tables($dbh); $self->created_at(time) unless $self->created_at; @@ -93,6 +91,7 @@ sub last_commit_xap { $self->meta_accessor("last_xap$version-$i", $commit); } +# this is the UIDVALIDITY for IMAP (cf. RFC 3501 sec 2.3.1.1. item 3) sub created_at { my ($self, $second) = @_; $self->meta_accessor('created_at', $second);