waterWang opened a new pull request, #71472: URL: https://github.com/apache/airflow/pull/71472
When a task instance transitions to running, the execution API collects every XCom key for that task instance into `TIRunContext.xcom_keys_to_clear`, and the worker deletes each one. There is no filter — the only exemption is deferral. This means a retry deletes the `_link_*` rows written by every previous attempt. An extra link can only ever resolve for the attempt that ran last. This collides with #65661 (try-aware extra-links endpoint), which made the read path attempt-aware while the write path still guarantees only the latest attempt's row exists. **Fix**: Filter out XCom keys starting with `_link_` (the default `xcom_key` prefix for `BaseOperatorLink`) from the `xcom_keys_to_clear` list. This preserves per-attempt extra link rows across retries, allowing the try-aware endpoint to resolve links for any attempt. Fixes #71471. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
