Skip to content

fix(singleflight): drop duplicate keys outside the table lock - #349

Merged
tisonkun merged 1 commit into
mainfrom
codex/fix-singleflight-key-drop
Oct 3, 2026
Merged

tisonkun merged 1 commit into
mainfrom
codex/fix-singleflight-key-drop

Conversation

@tisonkun

@tisonkun tisonkun commented Oct 3, 2026

Copy link
Copy Markdown
Member

Summary

Prevent a deadlock when the destructor of a duplicate singleflight key calls back into the group. Use explicit lookup and insertion so unused keys are dropped after releasing the table lock.

Add regression coverage for both work and try_work, verify coalesced results, and record the fix in the changelog. The regression test uses the existing deadlock watchdog and fails on the previous implementation.

Validation: cargo x test (619 passing tests), cargo x check (26 feature configurations), and cargo x lint.

@tisonkun
tisonkun merged commit 822d0d9 into main Oct 3, 2026
9 checks passed
@tisonkun
tisonkun deleted the codex/fix-singleflight-key-drop branch October 3, 2026 16:34
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.

1 participant