Skip to content

fix(cache): reuse entries filled before a late singleflight miss - #259

Draft
n30nex wants to merge 1 commit into
devfrom
codex/cache-late-miss-20261020
Draft

n30nex wants to merge 1 commit into
devfrom
codex/cache-late-miss-20261020

Conversation

@n30nex

@n30nex n30nex commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

A Redis miss can arrive just before a coalesced request fills the cache, then enter singleflight after the original leader has finished. Rechecking the typed cache entry inside the new leader avoids a duplicate database query.

The regression reproduces that late-miss ordering deterministically. The cache suite passed 20 repetitions, and the same change is included in the qualified Canadaverse preview backend. No API or schema change.

Closes #258.

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.

Recheck Redis after a late miss becomes the singleflight leader

1 participant