Skip to content

Race condition in semantic cache read-modify-write #6

Description

@flxhrdyn

File: backend/app/cache_manager.py:73-142 (get_semantic/add_semantic)

Read-modify-write on the semantic_registry list (disk_cache.get -> mutate -> disk_cache.set) has no lock.

Failure scenario: Two concurrent requests both read the same registry snapshot, each append their own entry, and the second set silently overwrites the first's addition, losing a semantic-cache entry under concurrent load.

See docs/rag-audit-findings.md (item 6).

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions