diff --git a/helm/Chart.yaml b/helm/Chart.yaml index e4017805..bd433182 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.23 -appVersion: "2.1.17" +version: 2.0.24 +appVersion: "2.1.18" keywords: - imap - submission diff --git a/internal/storage/index/file/folder.go b/internal/storage/index/file/folder.go index c8787f35..2b60699a 100644 --- a/internal/storage/index/file/folder.go +++ b/internal/storage/index/file/folder.go @@ -112,6 +112,19 @@ func (u *userIndex) OpenFolder(folder string, uidValidity uint32) (*mailbox.Fold // Caller holds no locks — this runs only once per session-folder. func (u *userIndex) loadOrInit(fs *folderState, uidValidity uint32) error { st, err := os.Stat(fs.indexPath) + // Breadcrumb (#644/#647): unconditional, every call — not just the + // ErrNotExist branch — so a live repro can see the FULL stat-outcome + // history for a given index_path across processes (e.g. lmtp seeing it + // exist at t0 and imap seeing ErrNotExist at t0+1.4s for the exact same + // path is otherwise only inferable from the absence of a second + // createFresh call, not directly observed). + if err != nil { + slog.Debug("fileindex: loadOrInit stat", "folder", fs.folder, + "index_path", fs.indexPath, "exists", false, "err", err.Error()) + } else { + slog.Debug("fileindex: loadOrInit stat", "folder", fs.folder, + "index_path", fs.indexPath, "exists", true, "size", st.Size(), "mod_time", st.ModTime().UnixNano()) + } switch { case errors.Is(err, os.ErrNotExist): return fs.createFresh(uidValidity)