Skip to content

chore(deletions): Improve cleanup multiprocess worker logging#104228

Merged
yuvmen merged 2 commits intomasterfrom
yuvmen/better-cleanup-multiprocess-worker-logging
Dec 2, 2025
Merged

chore(deletions): Improve cleanup multiprocess worker logging#104228
yuvmen merged 2 commits intomasterfrom
yuvmen/better-cleanup-multiprocess-worker-logging

Conversation

@yuvmen
Copy link
Copy Markdown
Member

@yuvmen yuvmen commented Dec 2, 2025

During cleanup we schedule internal workers to handle chunks of deletions, these worker now have context of the project_id being worked and add it to logs, allowing us to track specific projects' group deletions.
Also corrected the reporting of cleanup.chunk_processed metric which seems to increase by the full chunk on every step, inflating the metric.

During cleanup we schedule internal workers to handle chunks of deletions, these worker
now have context of the project_id being worked and add it to logs, allowing us to
track specific projects' group deletions.
Also corrected the reporting of `cleanup.chunk_processed` metric which seems to increase
by the full chunk on every step, inflating the metric.
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 2, 2025
break

# Increment metric once per chunk, after all iterations complete
metrics.incr("cleanup.chunk_processed", tags={"model": model_name}, amount=chunk_size)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved this outside the while True since it basically increased it by chunk size every internal iteration

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #104228      +/-   ##
===========================================
+ Coverage   80.21%    80.61%   +0.39%     
===========================================
  Files        9333      9334       +1     
  Lines      398592    398891     +299     
  Branches    25495     25495              
===========================================
+ Hits       319743    321556    +1813     
+ Misses      78399     76885    -1514     
  Partials      450       450              

Copy link
Copy Markdown
Member

@armenzg armenzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beauty! 🎉

@yuvmen yuvmen merged commit ca13cef into master Dec 2, 2025
67 checks passed
@yuvmen yuvmen deleted the yuvmen/better-cleanup-multiprocess-worker-logging branch December 2, 2025 22:44
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants