about summary refs log tree commit homepage
path: root/lib/PublicInbox/IMAPD.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-06-10 07:05:12 +0000
committerEric Wong <e@yhbt.net>2020-06-13 07:55:45 +0000
commitd0dcab33e0b02bf3299deea40f96ef5fff10fe73 (patch)
tree2c0343463544400798fb73e7567978cb83af116b /lib/PublicInbox/IMAPD.pm
parent56e4554469fb86c2cac63d9eabaffa64c531e835 (diff)
downloadpublic-inbox-d0dcab33e0b02bf3299deea40f96ef5fff10fe73.tar.gz
We can get exact values for EXISTS, UIDNEXT using SQLite
rather than calculating off $ibx->mm->max ourselves.

Furthermore, $ibx->mm is less useful than $ibx->over for IMAP
(and for our read-only daemons in general) so do not depend on
$ibx->mm outside of startup/reload to save FDs and reduce kernel
page cache footprint.
Diffstat (limited to 'lib/PublicInbox/IMAPD.pm')
-rw-r--r--lib/PublicInbox/IMAPD.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/IMAPD.pm b/lib/PublicInbox/IMAPD.pm
index 186ec7b0..e4dc90e8 100644
--- a/lib/PublicInbox/IMAPD.pm
+++ b/lib/PublicInbox/IMAPD.pm
@@ -44,7 +44,7 @@ sub imapd_refresh_ibx { # pi_config->each_inbox cb
         # this case is a 32-bit representation of the creation
         # date/time of the mailbox"
         defined($ibx->{uidvalidity} = $mm->created_at) or return;
-        PublicInbox::IMAP::ensure_ranges_exist($imapd, $ibx, $mm->max // 1);
+        PublicInbox::IMAP::ensure_ranges_exist($imapd, $ibx, $mm->max // 0);
 
         # preload to avoid fragmentation:
         $ibx->description;