temp: bypass awaiting futures while still recording metrics#720
Merged
Conversation
bmckerry
commented
Jun 17, 2026
| else: | ||
| # FIXME(benm): Temporarily bypass producer futures needing to be completed | ||
| # before writing to `processed_tasks` while still recording metrics. | ||
| _place_processing_result( |
Member
Author
There was a problem hiding this comment.
I'm assuming its safe to put a task's ProcessingResult in the processed_tasks queue while still keeping the inflight activation itself pending in the worker child's queue - if I need to somehow clone anything here let me know
untitaker
approved these changes
Jun 17, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 758f08c. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

We found a bug where some futures weren't completing after several minutes, leading to processing deadlines getting exceeded.
I've added more metrics to help troubleshoot what's happening here, but since having tasks exceed their processing deadline has customer impact this isn't really safe to re-enable in prod.
This PR has activations that produced messages be placed in
processed_tasksqueue immediately after the task function completes (which is the current behaviour), while still also keeping tasks with futures in the worker child's local queue (meaning we'll still get metrics reported on pending futures).