Skip to content

debug: log every loadOrInit stat outcome, not just the ErrNotExist branch (#644)#657

Merged
0kaba0hub merged 1 commit into
mainfrom
debug/loadorinit-stat-outcome
Jul 19, 2026
Merged

debug: log every loadOrInit stat outcome, not just the ErrNotExist branch (#644)#657
0kaba0hub merged 1 commit into
mainfrom
debug/loadorinit-stat-outcome

Conversation

@0kaba0hub

Copy link
Copy Markdown
Owner

Summary

Live evidence on latest (post-#655): the NextUID regression still reproduces, with only ONE createFresh call observed for the affected path (from yarilo-imap), none from yarilo-lmtp — disproving the "two processes both discover a missing file simultaneously" theory floated in an earlier #644 comment. yarilo-lmtp had already used the same folder successfully through uid=19 before yarilo-imap's os.Stat on the identical path returned ErrNotExist ~1.4s later.

This PR

loadOrInit now logs the stat outcome (exists/size/mod_time, or the literal error) on every call, not just when it's about to call createFresh — so a live repro can see the full stat-outcome history for a given index_path across processes instead of inferring it from the presence/absence of a createFresh WARN on one side only.

Purely additive logging — no behavior change. go test ./... green.

…anch (#644)

Live evidence on latest (post-#655): the NextUID regression still reproduces,
with only ONE createFresh call observed for the affected path (from
yarilo-imap), none from yarilo-lmtp — disproving the "two processes both
discover a missing file simultaneously" theory. yarilo-lmtp had already used
the same folder successfully through uid=19 before yarilo-imap's os.Stat on
the identical path returned ErrNotExist ~1.4s later.

loadOrInit now logs the stat outcome (exists/size/mod_time, or the literal
error) on every call, not just when it's about to call createFresh — so a
live repro can see the full stat-outcome history for a given index_path
across processes instead of inferring it from the presence/absence of a
createFresh WARN on one side only.

Purely additive logging — no behavior change. go test ./... green.
@0kaba0hub
0kaba0hub merged commit d9c5d3a into main Jul 19, 2026
3 checks passed
@0kaba0hub
0kaba0hub deleted the debug/loadorinit-stat-outcome branch July 19, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants