Preventing Thread Pool Stalls in Databricks Unity Catalog
This document provides guidance on preventing thread pool stalls during resource and permission loading in Databricks Unity Catalog. The strategy is to introduce configurable timeouts that monitor thread activity and safely shut down non-responsive thread pools, and to optionally enable the ThreadPool V2 implementation.
Thread pool stalls can occur when threads in a multithreaded execution pool become inactive and fail to make progress. To address this, configurable timeouts are introduced to monitor activity. If a pool remains idle beyond the defined threshold, it is considered stalled and the associated executors are safely shut down. This helps the connector recover on the next scheduled run without manual intervention.
Configuration Properties¶
Property | Feature | Description | Default Value | Possible Values |
---|---|---|---|---|
CONNECTOR_DATABRICKS_UNITY_CATALOG_LOAD_RESOURCES_THREAD_POOL_WAIT_TIMEOUT_MINUTES | Resource Thread Stall Timeout | Maximum duration (in minutes) a resource-loading thread pool can wait without making progress before it is shut down. | 1200 minutes | Any positive integer (in minutes) |
CONNECTOR_DATABRICKS_UNITY_CATALOG_LOAD_PERMISSIONS_THREAD_POOL_WAIT_TIMEOUT_MINUTES | Permission Thread Stall Timeout | Maximum duration (in minutes) a permission-loading thread pool can wait without making progress before it is shut down. | 1200 minutes | Any positive integer (in minutes) |
CONNECTOR_DATABRICKS_UNITY_CATALOG_USE_THREADPOOL_V2 | ThreadPool V2 | Enables the V2 thread pool executor for improved shutdown coordination and metrics. | true | true , false |
Setup¶
Warning
Replace the <PLEASE_CHANGE>
placeholder with appropriate values for your environment.
To configure the stall timeouts and optionally enable ThreadPool V2, add the following properties in Privacera Manager for the Unity Catalog connector instance:
-
SSH to the instance where Privacera Manager is installed.
-
Run the following command to open the .yml file to be edited:
Note
If you have multiple connectors, then replace instance1 with the appropriate connector instance name.
Bash -
Set the following properties:
-
In PrivaceraCloud portal, navigate to Settings -> Applications.
-
On the Connected Applications screen, select Databricks Unity Catalog.
-
Click the pen icon or the Account Name to modify the settings.
-
On the Edit Application screen, go to Access Management -> ADVANCED tab.
-
Under Add New Custom Properties, add the following properties:
- Prev topic: Advanced Configuration