Skip to content

Fixed config override not playing nicely with pool executors#191

Open
andrei-katkov wants to merge 1 commit into
ClickHouse:mainfrom
andrei-katkov:config-override-fix
Open

Fixed config override not playing nicely with pool executors#191
andrei-katkov wants to merge 1 commit into
ClickHouse:mainfrom
andrei-katkov:config-override-fix

Conversation

@andrei-katkov

Copy link
Copy Markdown
Contributor

Fixes request-scoped ClickHouse client config overrides getting lost when run_query executes in QUERY_EXECUTOR.

The server now captures FastMCP context state before the thread-pool handoff, deep-copies valid clickhouse_client_config_overrides, and passes them explicitly into the worker path. This preserves per-request settings.role for shared long-lived MCP server usage without relying on contextvars inside executor threads.

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