thelioo opened a new pull request, #76651:
URL: https://github.com/apache/airflow/pull/76651

   `dag_processing.processes` is documented as the relative number of running 
parsing processes, going negative when processes have completed. 
`_start_new_processes` increments it for every process, but only the stop, 
timeout and terminate paths decremented it. `_collect_results`, which handles 
every normal exit, did not, so the counter drifted up for as long as the Dag 
processor ran.
   
   This decrements the metric in `_collect_results` with `action=finish`, using 
the same tags as the other paths. The stop and timeout paths remove the 
processor from `_processors`, and `terminate` only runs at shutdown, so 
`_collect_results` does not count those processes again.
   
   The new test fails without this change. `test_manager.py` passes in Breeze 
(363 passed, 6 skipped). The change adds one `stats.decr` per finished process 
in the Dag processor loop, and I did not run a benchmark for it.
   
   closes: #69984
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 5.5)
   
   Generated-by: Claude Code (Opus 5.5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
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]

Reply via email to