Skip to content

When there is a cache miss, multiple singleflight calls may be scheduled and all executed. #9

Open

Description

@zalenskivolt

Since there is a tiny gap between checking the cache and scheduling a singleflight call, concurrent calls for the same key may schedule multiple singleflight calls.

See #8 for a test and potential fix (to re-check the cache once inside singleflight).

Activity

  1. zalenskivolt commented on Oct 6, 2026

    @zalenskivolt
    Author

    note: this was found when a test was failing, so it can happen, even if rare…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions