fix several async transport issues#4694
Merged
Merged
Conversation
1 task
kacpermuda
reviewed
Jul 6, 2026
kacpermuda
reviewed
Jul 6, 2026
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4694 +/- ##
=======================================
Coverage 73.72% 73.72%
=======================================
Files 21 21
Lines 2356 2356
=======================================
Hits 1737 1737
Misses 619 619 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Maciej Obuchowski <maciej.obuchowski@datadoghq.com>
mobuchowski
force-pushed
the
fix-dd-transport
branch
from
July 6, 2026 17:05
ae07d52 to
0a336a7
Compare
kacpermuda
approved these changes
Jul 7, 2026
wangxiaojing
pushed a commit
to wangxiaojing/OpenLineage
that referenced
this pull request
Jul 21, 2026
Signed-off-by: Maciej Obuchowski <maciej.obuchowski@datadoghq.com> Signed-off-by: wangxiaojing <u9jing@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes 3 bugs in the Datadog transport that caused Airflow scheduler CPU to climb until it hit its limit (issue #4683). The transport built an async HTTP worker thread for every instance, even when nothing routed to it, and that thread polled constantly even when idle. A separate bug also leaked memory when a run's START event failed.
What was wrong
DatadogTransport built an AsyncHttpTransport on every construction, whether or not any event ever used it. Building AsyncHttpTransport starts a daemon thread. With the default routing rules, most events never use the async path, so most of these threads did nothing but consume CPU.
Each idle thread polled its queue every 0.01 seconds, forever. On a production scheduler that built one client per event, this added up: 50 instances used 29.5% CPU while idle, 400 instances used 167.6%.
A third bug caused a memory leak: when a run's START event failed after all retries, any completion events already queued for that run stayed in memory. Nothing released them.
What changed
We made 3 changes to client/python/src/openlineage/client/transport/:
Checklist