From 44fd55c1f876f1ac6b653d10f824e033a4fe2896 Mon Sep 17 00:00:00 2001 From: Ihor Rusyn <0kaba0@gmail.com> Date: Sun, 19 Jul 2026 03:03:05 +0200 Subject: [PATCH] chore(fileindex): strip upstream references from code comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two comments introduced in #644's fix named an upstream project / its source symbol. Yarilo is its own product — such references belong in commits, PRs and docs, not in // comments. Reword to describe the mechanism (inode+device identity check; re-fetching the header after a log rotation) without the attribution. No behaviour change. --- helm/Chart.yaml | 4 ++-- internal/storage/index/file/file.go | 4 ++-- internal/storage/index/file/folder.go | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) 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