Area: API Issues
Sub-Area: Search and Filtering
Issue
Entities with tags are visible on their detail pages and confirmed via direct URN lookup, but do not appear in scrollAcrossEntities or searchAcrossEntities results when filtering by that tag. This issue is intermittent - not all tagged entities are affected, and the entity count when filtering by tag is also incorrect. The problem occurs due to a race condition in the Elasticsearch bulk write processor where concurrent aspect writes for the same entity can land on different threads, causing partial updates to be silently dropped and leaving the search index stale.
You Might Be Asking
- Why can I see tags on entity pages but they don't show up in API search results?
- Why are some tagged entities missing from scrollAcrossEntities responses?
- Why is the count of tagged entities incorrect when filtering?
Solution
-
Immediate workaround for specific entities:
- Navigate to the affected entity's detail page
- Remove the tag via the UI
- Re-add the same tag
- This forces a fresh write to the search index and resolves the issue for that entity
-
For DataHub Cloud users:
- Contact DataHub Support to request a targeted reindex of affected entities
- Support can trigger a reindex of entities tagged within a specific timeframe
- This resolves the issue for all affected entities at once
-
For self-hosted deployments:
- Use the DataHub CLI to reindex affected entities:
datahub put aspects --urn "urn:li:dataset:(, , )" --aspect globalTags - Or trigger a broader reindex of the globalTags aspect:
curl -X POST "http://:8080/aspects?action=reindex" \ -H "Content-Type: application/json" \ -d '{"aspectName": "globalTags"}' -
Verify the fix:
- Test the scrollAcrossEntities API with tag filters:
curl -X POST "http://:8080/entities?action=scrollAcrossEntities" \ -H "Content-Type: application/json" \ -d '{ "input": { "filters": [ { "field": "tags", "values": [" "] } ], "entities": ["dataset", "dashboard", "chart"], "count": 100 } }'
Additional Notes
This is a known product regression caused by a race condition in Elasticsearch bulk write operations. The fix involves routing all bulk operations by document ID to ensure writes for the same entity are serialized. For DataHub Cloud customers, this fix must be deployed by Acryl Support. Self-hosted users should upgrade to a version that includes the fix (commit 5723176e3e7 or later). The issue is more likely to occur with frequent tag operations or high-concurrency environments.
Related Documentation
Tags: search-api, tags, elasticsearch, indexing, scrollAcrossEntities, race-condition, cloud, reindex, stale-index, bulk-writes