← Back to journal
Data Engineering

Two Airflow time limits that drop OpenLineage events

László Hadházy·November 21, 2026·9 min read

OpenlineageAirflowMarquezLineage

The usual advice for keeping a raw copy of your lineage is one block of YAML. OpenLineage's Python client — the one dbt-ol and Airflow's provider both use — has a composite transport that sends every event to several places, so you keep your existing backend and add a file or a bucket beside it. We give exactly that advice in the pilot guide for Qedro — our open-source tool that builds a record of processing activities from lineage events, introduced with our other open-source packages — because the raw events are what an audit trail is built from, and most backends cannot hand them back as they were sent.

To test that advice against real systems rather than mocks, I built qedro-lab: Marquez, which is OpenLineage's reference backend, plus Kafka, emulators for S3, GCS and Azure Blob, and a plain directory, all fed by one composite transport, with Airflow, dbt, art30-emit and our pipeline runtime as the emitters. After every simulated day a check reads each destination back and requires the same events from all six.

It took two days of runs before all six held the same events, and none of the fixes was a bug in OpenLineage or Airflow: every one changed a default that was doing what its documentation says.

A composite transport sends an event to each destination in turn, so a destination receives it only if the emission is still running when its turn comes. Two Airflow time limits decide how long that is, an HTTP retry can deliver the same event twice, and none of the three logs an error.

What was tested

Everything below came from qedro-lab on an arm64 Mac, with openlineage-python 1.55.0, Airflow 3.4.0 with apache-airflow-providers-openlineage 2.21.0, and Marquez 0.51.1. The defaults quoted below are those of these versions; the lab pins every other image and package in its compose.yaml and its Airflow image's requirements files, so docker compose --profile scheduler up at that commit reproduces the runs. Marquez publishes an amd64 image only, so it ran under emulation, first QEMU and later Rosetta, and that made it slower than it would be on a server. I say so because it made the failures easier to reach, not because it caused them: every threshold below is a default that a loaded production backend can cross too.

Every emitter in the lab reads one OpenLineage client configuration, lab/openlineage.yml, through the OPENLINEAGE_CONFIG environment variable — dbt-ol and art30-emit directly, Airflow's provider through [openlineage] config_path. It is the pilot guide's composite transport extended from two destinations to six, which the composite calls its transports. This is the file as first written, with Marquez listed first:

# lab/openlineage.yml, as first written
transport:
  type: composite
  continue_on_success: true    # send to all of them, not just the first that accepts
  transports:
    marquez:
      type: http
      url: http://marquez:5000
    directory:
      type: file
      log_file_path: /events/directory/ol
      append: false
    # ... s3, gcs, azure as bucket file transports, and kafka

Both continue flags default to true. continue_on_success is what makes the composite send to every destination instead of stopping at the first that accepts. continue_on_failure lets it carry on past a destination that fails, and the lab turns it off, so that a destination refusing an event fails the run rather than quietly holding one event fewer. The order of the destinations decides which destinations miss an event when an emission is stopped partway, which is what the next section measured.

The provider stops an emission at ten seconds

Airflow's OpenLineage provider waits for each emission for at most [openlineage] execution_timeout, which defaults to 10 seconds, and then proceeds without it. The composite, without sort_transports, sends to its destinations in the order they are listed.

With Marquez listed first, one POST took 17 seconds. The emission was stopped after Marquez had stored the event and before any other destination was reached:

How a ten-second limit cost the archive one eventAn Airflow task emits a START event through a composite transport whose first destination is Marquez and whose second is the archive. The composite posts the event to Marquez, which takes 17 seconds to answer. The provider stops the emission at 10 seconds, after Marquez has stored the event but before the composite reaches the archive, so the archive never receives it. No error is logged.Archive, listed secondMarquez, listed firstComposite transportAirflow taskArchive, listed secondMarquez, listed firstComposite transportAirflow taskexecution_timeout reached at 10 semission stoppednever receives the eventemit STARTPOST the event201 Created, after 17 s

The diagram, in words: the event reached the first destination in the list and no other, because the emission ran out of time while the first destination was still answering, and the archive was second. The check reported it as one START that Marquez held and the directory, the three buckets and Kafka did not, and the task's log carried no error.

The fix has two parts. List the copies first: a slow backend listed last can only delay itself. And raise execution_timeout above the slowest your destinations answer. The lab now lists the directory, the buckets and Kafka ahead of Marquez, and allows 180 seconds.

A successful task keeps its process for twenty seconds

With the copies listed first, the next clean run under Airflow's scheduler missed a different event, at a different point in the list. A task's COMPLETE reached the directory and two of the buckets, and never reached Azure, Kafka or Marquez: 44 events in three destinations, 43 in the other three. The task's log stopped dead at the start of the emission:

08:55:00.140 info Running statement: SELECT CURRENT_SCHEMA;, parameters: None
08:55:00.154 info Rows affected: 1
08:55:00.544 info OpenLineageClient will use `composite` transport

Under the scheduler, Airflow ends a task's process a fixed time after the task is marked successful. The setting is [core] task_success_overtime, added in Airflow 2.10, and the configuration reference describes it as the "maximum possible time (in seconds) that task will have for execution of auxiliary processes (like listeners, mini scheduler...) after task is marked as success". Its default is 20 seconds. The OpenLineage listener is one of those auxiliary processes, so a COMPLETE to six destinations that needs longer than 20 seconds is cut off by the supervisor, wherever in the list it has reached.

It never showed under airflow dags test, which runs every task in one process, so a pipeline tested only that way can pass and still lose events once the scheduler runs it. The lab sets it to 180 seconds, the same value it gives the provider's limit, and once both were raised no event was cut off.

The HTTP client retries, and Marquez keeps every attempt

The third mechanism produces extra events rather than missing ones. The HTTP transport's timeout is 5 seconds unless you set it — the default in the client's source — and after it the client retries. Marquez stores what it receives, so a POST it accepted after the client had stopped waiting is stored again when the retry arrives.

On the first day, one START was in Marquez's lineage_events table three times, and Marquez's events API returned 12 events where the directory, the buckets and Kafka, all fed by the same transport, held 10. Raising the timeout to 30 seconds was not enough under emulation, because a later POST took 36 seconds and one more duplicate appeared. The lab allows 120 seconds.

A consumer reading from such a backend should count an identical event once, because an HTTP backend that keeps every retry gives anything built from its events — Qedro's record of processing activities, for one — a count that is too high. Qedro is being changed to do that, and to say in its output how many duplicates it set aside.

Why my own check missed the duplicates

The check that caught all of this did not catch the duplicates at first. It compared the set of events in each destination, keyed by run, event type and time. Marquez reported 12 events against the directory's 10, and the check printed "every source holds the same 10 events", because a set holds a duplicate once.

# What the check compared: sets, so a duplicate disappears.
keys = {(e.run.run_id, e.event_type, e.event_time.isoformat()) for e in events}
 
# What it compares now: counts, so a duplicate is one extra.
keys = Counter((e.run.run_id, e.event_type, e.event_time.isoformat()) for e in events)

With counts, the same run reported "marquez differs from the directory: 0 missing, 2 extra". If you reconcile lineage destinations, compare counts. Comparing sets misses exactly the duplicates a retrying transport produces.

Settings under which all six destinations held the same events

After the three changes, two days under Airflow's scheduler produced 56 events in each of the six destinations, and the same check passed on a GitHub runner on x86, where Marquez needs no emulation. The Airflow side:

# docker-compose environment for the Airflow containers
AIRFLOW__OPENLINEAGE__CONFIG_PATH: /lab/openlineage.yml
AIRFLOW__OPENLINEAGE__EXECUTION_TIMEOUT: "180"   # 10 by default
AIRFLOW__CORE__TASK_SUCCESS_OVERTIME: "180"      # 20 by default, Airflow 2.10+

And lab/openlineage.yml as it ended up, with the copies first and Marquez's own timeout raised:

# lab/openlineage.yml, as it ended up
transport:
  type: composite
  continue_on_success: true
  continue_on_failure: false    # a destination that refuses an event fails the run
  transports:
    directory:        # the copies first: a slow backend can only delay itself
      type: file
      log_file_path: /events/directory/ol
      append: false
    # ... the buckets and Kafka
    marquez:
      type: http
      url: http://marquez:5000
      timeout: 120    # 5 by default, and Marquez stores each retry

The numbers are the lab's, chosen to cover a backend under emulation. In a real deployment, set both Airflow limits above the slowest your destinations answer, the HTTP timeout above the slowest the backend accepts an event, and the copy you audit from listed before anything that can be slow.

The pilot guide now says this, and the lab's README keeps the full list of what running it found, including two Airflow behaviours under dags test that make a capture differ from a scheduled run.


If you keep a copy of your lineage beside a backend and have seen it drift — or if you would push back on any of this — the door's open at cordata.tech/contact.

Further reading