Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions internal/storage/index/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 insteadre-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()
Expand Down
6 changes: 3 additions & 3 deletions internal/storage/index/file/folder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading