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 panic on evict w/ buffered tasks #660

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

Sushisource
Copy link
Member

This never should have been a panic in the first place. I think I had it that way while testing and forgot to undo it. It's fairly hard to trigger.

@Sushisource Sushisource requested a review from a team as a code owner December 14, 2023 23:12
@@ -386,7 +386,7 @@ impl WFStream {
// We accept that there might be query tasks remaining in the buffer if we evicted
// and re-instantiated here. It's likely those tasks are now invalidated anyway.
if maybe_buffered.has_tasks() && should_evict {
panic!("There were leftover buffered tasks");
warn!("There were leftover buffered tasks when evicting run");
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you confirm -- you don't need to drain the buffer contents? So these are either going to be treated as valid items, or the buffer is about to be drained anyway, or destroyed?

Copy link
Member Author

Choose a reason for hiding this comment

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

The tasks will just get dropped. It's not a meaningful issue for the reason the comment mentions. Worst case the task was valid, and it'll time out and get retried.

Copy link
Contributor

@dandavison dandavison left a comment

Choose a reason for hiding this comment

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

LGTM!

@Sushisource Sushisource enabled auto-merge (squash) December 14, 2023 23:19
@Sushisource Sushisource enabled auto-merge (squash) December 14, 2023 23:19
@Sushisource Sushisource merged commit c84eff0 into temporalio:master Dec 14, 2023
7 checks passed
@Sushisource Sushisource deleted the fix-buf-task-panic branch December 14, 2023 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants