refers to patterns and configurations where a single task (or a well-defined group) has exclusive write or read rights to a specific XCom key. This prevents race conditions, improves determinism, and enhances security.
dag = DAG( 'xcom_example', default_args=default_args, schedule_interval=timedelta(days=1), ) airflow xcom exclusive
But this flexibility comes at a cost. In large-scale data pipelines, the default XCom behavior can lead to bloated metadata databases, security vulnerabilities, race conditions, and debugging nightmares. refers to patterns and configurations where a single
@task def exclusive_push(): with r.lock("xcom:my_key", timeout=10): r.set("xcom:my_key", "my_value") "my_value") : In the airflow.models.xcom API
: In the airflow.models.xcom API, the parameters run_id and execution_date (now deprecated in favor of run_id ) are mutually exclusive when querying for task values. "Exclusive" Design Patterns