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

Flush buffer event when failing workflow task #4010

Merged
merged 5 commits into from Mar 24, 2023

Conversation

yux0
Copy link
Contributor

@yux0 yux0 commented Mar 5, 2023

What changed?
Flush buffer event when failing workflow task

Why?
When workflow task failed due to payload/search attribute size too large, it should flush buffer events before fail the workflow.

How did you test it?

Potential risks

Is hotfix candidate?

@yux0 yux0 requested review from yycptt and wxing1292 March 5, 2023 05:50
@yux0 yux0 requested a review from a team as a code owner March 5, 2023 05:50
Copy link
Member

@yycptt yycptt left a comment

Choose a reason for hiding this comment

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

Can we add a test for this?

Comment on lines +551 to 556
// Flush buffer event before failing the workflow
ms.FlushBufferedEvents()

attributes := &commandpb.FailWorkflowExecutionCommandAttributes{
Failure: wtFailedCause.workflowFailure,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

i believe there is a util which flush & fail the workflow, can we plz use that util?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a util to fail workflow task and flush. This one is to flush before fail the whole workflow.

@yux0 yux0 enabled auto-merge (squash) March 24, 2023 02:14
@yux0 yux0 merged commit 11cef80 into temporalio:master Mar 24, 2023
7 checks passed
@yux0 yux0 deleted the fix-buffer-event branch March 24, 2023 06:21
yycptt pushed a commit that referenced this pull request Mar 24, 2023
* Flush buffer event when failing workflow task
yycptt pushed a commit that referenced this pull request Mar 24, 2023
* Flush buffer event when failing workflow task
wxing1292 pushed a commit that referenced this pull request Apr 14, 2023
* Flush buffer event when failing workflow task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants