You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(Databricks): databricks-sql-connector executes queries sequentially regardless of concurrent_tasks #5858
When using the Databricks SQL Connector for SQL models and setting concurrent_tasks > 1, SQLMesh will spawn as many threads as concurrent_tasks, but they can only execute commands sequentially due to the lock in the ThreadLocalSharedConnectionPool.
Root Cause
I believe this has been caused by setting shared_connection = True in #5746, whilst this has resolved the issue of OAuth race conditions, it has done so by forcing everything to be sequential.
Proposed Solutions
There is an interim solution and a longer term solution that I believe should be implemented:
Interim Solution
Set shared_connection to be based on whether an OAuth authentication method is being used. If an access token is being used, then a non-shared connection is suitable.
In core/config/connection.py:DatabricksConnectionConfig:
Activity
davem-bis commentedon Jun 24, 2026
I've implemented the interim solution in PR #5859.