debug: log every loadOrInit stat outcome, not just the ErrNotExist branch (#644)#657
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Live evidence on
latest(post-#655): the NextUID regression still reproduces, with only ONEcreateFreshcall observed for the affected path (fromyarilo-imap), none fromyarilo-lmtp— disproving the "two processes both discover a missing file simultaneously" theory floated in an earlier #644 comment.yarilo-lmtphad already used the same folder successfully throughuid=19beforeyarilo-imap'sos.Staton the identical path returnedErrNotExist~1.4s later.This PR
loadOrInitnow logs the stat outcome (exists/size/mod_time, or the literal error) on every call, not just when it's about to callcreateFresh— so a live repro can see the full stat-outcome history for a givenindex_pathacross processes instead of inferring it from the presence/absence of acreateFreshWARN on one side only.Purely additive logging — no behavior change.
go test ./...green.