Skip to content

BUG: Duplicate _client_cache/_collection_cache declarations reset state in mcp_server.py #479

@jphein

Description

@jphein

Summary

mcp_server.py declares _client_cache = None and _collection_cache = None twice at module level:

  • Lines 66-67: initial declaration
  • Lines 103-104: second declaration after the WAL setup block

The second declaration silently resets both caches. Currently harmless on a cold import, but any code inserted between the two blocks that sets these caches would have its state wiped. Signals the WAL setup was retrofitted and initialization ordering is fragile.

Fix

Remove the duplicate declarations at lines 103-104.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/mcpMCP server and toolsbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions