Skip to content

Shared cache is racy #36

@RReverser

Description

@RReverser

Shared cache implementation currently takes a lock, checks whether item is absent, releases the lock, takes the lock again, and only then inserts the item.

The problem is that in some scenarios another call to the same function can come in between those operations and take the lock, leading to racing errors.

It should instead hold the lock for the duration of the entire function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions