diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 77436ff9..01a04819 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: yarilo description: Production-grade IMAP/POP3/Submission mail server type: application -version: 2.0.17 -appVersion: "2.1.11" +version: 2.0.18 +appVersion: "2.1.12" keywords: - imap - submission diff --git a/internal/storage/index/file/file.go b/internal/storage/index/file/file.go index 2e178822..76a690d0 100644 --- a/internal/storage/index/file/file.go +++ b/internal/storage/index/file/file.go @@ -354,8 +354,8 @@ func (u *userIndex) compactLogIfNeeded(fs *folderState) { // last reload — that header could be stale (lower NextUID) and would regress // the folder's UID counter. Under the distributed mailbox lock this must not // happen; if the invariant is ever broken, bail and let the next reload - // reconcile from the rewritten base instead. Mirrors Dovecot re-fetching the - // index header after a log rotation rather than trusting the earlier one. + // reconcile from the rewritten base instead — re-fetching the index header + // after a log rotation rather than trusting an earlier snapshot of it. if fs.logFileReplaced() { slog.Warn("fileindex: skipping compaction, .log replaced since reload", "folder", fs.folder) fs.closeFDs() diff --git a/internal/storage/index/file/folder.go b/internal/storage/index/file/folder.go index ef8be3e1..eb4939b1 100644 --- a/internal/storage/index/file/folder.go +++ b/internal/storage/index/file/folder.go @@ -461,9 +461,9 @@ func (fs *folderState) reload() error { baseStat, baseErr := os.Stat(fs.indexPath) // Stat the .log by PATH so a replacement is detected by file IDENTITY, not - // merely mtime+size — mirroring Dovecot's mail_index_should_recreate - // inode+device check. Another process's compaction replaces the log via - // truncateLog's .tmp+rename (new inode); a cached fs.logFD left pointing at + // merely mtime+size — an inode+device identity check. Another process's + // compaction replaces the log via truncateLog's .tmp+rename (new inode); a + // cached fs.logFD left pointing at // the old, now-unlinked inode would otherwise fstat a stale size AND keep // absorbing our own appends into a file nobody else sees, so this session // would flush its stale (lower) header as ground truth and regress the