Area: Observability Issues
Sub-Area: Metadata Tests Job Performance & Scheduling
Applies to: Cloud
Issue
On instances with a large number of assets (hundreds of thousands or more), the scheduled Metadata Tests evaluation takes a very long time. Test results stop updating, or they update for some assets and not others, because a run does not finish before it is stopped or replaced by the next scheduled run.
Metadata Tests are a DataHub Cloud feature. On tenants that DataHub hosts, DataHub manages the evaluation job, so you can't change its schedule, time limit, or resources yourself. If you run DataHub Cloud in your own environment, you set these values in your Helm chart. See "Customer-hosted DataHub Cloud deployments" below. In both cases, you can change how much work each run has to do.
You Might Be Asking
- How often do Metadata Tests run?
- Why does the evaluation take so long on my instance?
- Can I change the schedule or settings of the evaluation job?
- Which tests make the job slower, and how do I turn them off?
- What does "N tasks still pending in actions executor service" mean?
Cause
The scheduled evaluation runs on a recurring schedule (by default every 24 hours) and evaluates all active tests against your assets. See Metadata Tests.
For each asset type that at least one active test selects (Dataset, Dashboard, Chart, Data Flow, Data Job, Container), the job reads every asset of that type in batches and evaluates the active tests against each batch. The work grows with the number of assets of those types and with the number of active tests. Tests that have actions (for example, add a tag or set a domain) also queue writes for the assets they act on.
The job has a schedule and a maximum run time. When a run needs more time than either allows, it stops before it finishes and the next run starts from the beginning.
The log line N tasks still pending in actions executor service comes from the end of a run. The job is shutting down and is waiting for N queued test actions (such as adding tags or owners) to finish. It is not an error by itself.
Solution
-
Reduce the number of active tests.
Go to Govern > Tests. You need the Manage Tests privilege to see this page. For each test, decide if it reflects a current governance requirement and if anyone acts on its results. Turn off the switch on the card of any test you don't need. A test that is turned off is skipped by the evaluation job. To remove a test for good, click the trashcan icon on the Tests list. Changes take up to 2 minutes to apply. See Metadata Tests.
-
Narrow the asset types your tests select.
The job reads every asset of each asset type that any active test selects. If no active test selects an asset type, the job does not read that type at all. Edit tests so that each one selects only the asset types it needs. For example, a test that only matters for Datasets should not also select Charts and Dashboards. Combine overlapping tests that select the same asset types into one test.
-
Review tests with actions.
Each test with actions writes to every asset it acts on. Remove actions that no one relies on, so each run queues fewer writes.
-
Contact DataHub Support for job settings.
If the job still does not finish after you reduce the work, contact DataHub Support. Include your approximate asset count, the number of active tests, and when test results last updated. DataHub Support can review the evaluation schedule and run settings for your instance.
Customer-hosted DataHub Cloud deployments
If you run DataHub Cloud on your own infrastructure and manage the Helm chart yourself, you can set the job options in your own values. They sit under datahubMetadataTestsJobTemplate.
-
activeDeadlineSeconds: the maximum run time. The default is 21600 (6 hours). Raise it so long runs can finish. -
concurrencyPolicy: the default isReplace. When the next run starts, it kills the run that is still going. Set it toForbidto let the running job finish first. -
dailyCronWindow.enabledandcron: setdailyCronWindow.enabledtofalse, then usecronto set a fixed start time or a weekly schedule. For example,cron: "0 6 * * *"starts the job at 06:00 each day. -
config.batchSize,config.batchDelayMs, andconfig.executorPoolSize: control how many assets the job reads per batch, the delay between batches, and how many workers run at once.
Talk to your DataHub contact before you change the batch settings.