Area: Ingestion Issues
Sub-Area: Executor Coordinator / Sweeper Job Failures
Applies to: Cloud
Issue
You run a self-hosted DataHub Cloud deployment on v0.3.16.x. That means you run GMS and the executor coordinator in your own Kubernetes cluster. Several ingestion runs show Running for hours, and Cancel doesn't clear them.
The executor coordinator logs this error once a minute:
Sweeper(<run_id>): error while running sweeper job: 400 Client Error: Bad Request for url: http://<gms-host>:8080/openapi/v2/entity/dataHubExecutionRequest?...
GMS logs a matching warning:
Blocked excessively long search query: <n> characters
This article is for deployments where you run the executor coordinator yourself. If DataHub hosts your DataHub Cloud instance, DataHub runs GMS and the executor coordinator for you. In that case, contact DataHub Support.
You Might Be Asking
- Why do my ingestion runs show Running for hours?
- Why does Cancel not change the status of a stuck run?
- What setting stops the sweeper's 400 error, and what value do I need?
- Do I have to start the stuck runs again after the fix?
Cause
The executor coordinator runs a sweeper job every 60 seconds. The sweeper cleans up ingestion runs:
- It marks a Running run as ABORTED when the run's status has had no update for 1 hour. This happens when the worker pod was evicted, crashed or restarted.
- It cancels duplicate runs of the same source.
- It force cancels a run that you asked to cancel.
- It restarts runs that it aborted.
The sweeper never marks a run as succeeded. The worker does that when the run ends.
Before the v0.3.16.x sweeper plans any action, it looks up the recent runs of each source that has a stale Running run. It sends GMS one search query for every 5 such sources. The query is a raw search string with one clause per source. With the UUID source ids that the UI creates, the query length is about:
- 240 characters for 1 source
- 490 characters for 3 sources
- 610 characters for 4 sources
- 740 characters for 5 sources
In v0.3.16, GMS started to reject search queries longer than SEARCH_VALIDATION_MAX_QUERY_LENGTH characters (default 500) with HTTP 400. So when 4 or more sources have stale runs at the same time, the query fails. That failure stops the whole sweeper cycle. The sweeper aborts nothing, cancels nothing and restarts nothing. The next cycle fails the same way, so the stale runs stay in Running, and a Cancel on them has no effect.
In v0.3.17, the sweeper sends the per-source conditions as structured filters instead. Its query string has a fixed length, so the number of sources no longer matters.
Solution
-
Upgrade to v0.3.17 or later. Upgrade your deployment, including the executor coordinator, to v0.3.17 or a later release. This removes the problem. See the v0.3.17 release notes.
-
If you can't upgrade yet, put one source in each sweeper query. Set
DATAHUB_EXECUTOR_GRAPH_ES_BATCH_SIZEto1on the executor coordinator in yourvalues.yaml:
acryl-datahub-executor-coordinator:
extraEnvs:
- name: DATAHUB_EXECUTOR_GRAPH_ES_BATCH_SIZE
value: "1"
Each query then holds one source and stays at about 240 characters with UUID source ids, however many sources have stale runs. The coordinator uses this setting only for this lookup. GMS keeps its search query length limit at the default, so you don't need to change SEARCH_VALIDATION_MAX_QUERY_LENGTH.
Even at the default setting, a query holds at most 5 sources, so with UUID source ids it never passes about 740 characters. The query doesn't get longer when you add sources. More sources mean more queries, not longer ones.
Apply the change:
helm upgrade <release-name> <chart> -f values.yaml --namespace <your-namespace>
- Check that the sweeper works. After the pods restart, read the coordinator logs:
kubectl logs deployment/<executor-coordinator-deployment-name> -n <your-namespace> | grep Sweeper
The 400 error stops. You see lines like these:
Sweeper(<run_id>): executing ABORTED action: Ingestion <execution-request-id> has been inactive for <seconds> seconds
Sweeper(<run_id>): plan execution finished: <n> of <n> actions succeeded.
-
Check the run history before you start runs by hand. You don't need to re-trigger the stuck runs. In its first successful cycle, the sweeper marks each stale run ABORTED. The run report says
Ingestion was aborted due to worker pod eviction, crash, or restart.When no newer run exists for that source, the sweeper also restarts the run on its own, up to 3 attempts by default. Look at each source's run history first, so you don't start a second run next to the automatic restart.