Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(taskworker) Reduce usage of countdown #88639

Merged
merged 2 commits into from
Apr 3, 2025
Merged

Conversation

markstory
Copy link
Member

Remove usage of short countdown durations for tasks and use transaction.on_commit() instead. These tasks appear to be using countdown as a way to prevent tasks being processed before postgres transactions are complete.

Refs #88091

Remove usage of short `countdown` durations for tasks and use
`transaction.on_commit()` instead. These tasks appear to be using
`countdown` as a way to prevent tasks being processed before postgres
transactions are complete.

Refs #88091
@markstory markstory requested a review from a team April 2, 2025 21:46
@markstory markstory requested review from a team as code owners April 2, 2025 21:46
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 2, 2025
Copy link

codecov bot commented Apr 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   #88639    +/-   ##
========================================
  Coverage   87.75%   87.76%            
========================================
  Files       10032    10032            
  Lines      568031   568137   +106     
  Branches    22310    22310            
========================================
+ Hits       498502   498613   +111     
+ Misses      69109    69104     -5     
  Partials      420      420            

@markstory markstory merged commit 91eabab into master Apr 3, 2025
48 checks passed
@markstory markstory deleted the fix-less-countdown branch April 3, 2025 20:07
enochtangg added a commit that referenced this pull request Apr 3, 2025
This work is required to migrate tasks from celery to the new taskbroker
system. The sentry option will be used to control the rollout of these
tasks. The full migration plan is describe in this
[document](https://www.notion.so/sentry/Rollout-Planning-1bd8b10e4b5d80aeaaa7dba0efca83bc).

### Notes:
- Updates `auto_resolve_snapshot_incidents` tasks to only produce task
after incident status is updated
- Depends on #88639 which fixes
countdown for the rest of the snuba subscription tasks

---------

Co-authored-by: Mark Story <[email protected]>
andrewshie-sentry pushed a commit that referenced this pull request Apr 8, 2025
Remove usage of short `countdown` durations for tasks and use
`transaction.on_commit()` instead. These tasks appear to be using
`countdown` as a way to prevent tasks being processed before postgres
transactions are complete.

Refs #88091
andrewshie-sentry pushed a commit that referenced this pull request Apr 8, 2025
This work is required to migrate tasks from celery to the new taskbroker
system. The sentry option will be used to control the rollout of these
tasks. The full migration plan is describe in this
[document](https://www.notion.so/sentry/Rollout-Planning-1bd8b10e4b5d80aeaaa7dba0efca83bc).

### Notes:
- Updates `auto_resolve_snapshot_incidents` tasks to only produce task
after incident status is updated
- Depends on #88639 which fixes
countdown for the rest of the snuba subscription tasks

---------

Co-authored-by: Mark Story <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants