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

Handle max signal count limit for signal transfer task #4051

Merged
merged 1 commit into from Mar 22, 2023

Conversation

yycptt
Copy link
Member

@yycptt yycptt commented Mar 13, 2023

What changed?

Why?

  • Limit total signal count per workflow

How did you test it?

  • Added unit test. Tested locally.

Potential risks

Is hotfix candidate?

  • Yes.

Comment on lines +659 to +660
case *serviceerror.InvalidArgument:
failedCause = enumspb.SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_SIGNAL_COUNT_LIMIT_EXCEEDED
Copy link
Member

Choose a reason for hiding this comment

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

shall we define a specific error type for this? (it is ok to use internal error type)

Copy link
Member Author

@yycptt yycptt Mar 22, 2023

Choose a reason for hiding this comment

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

yeah I think that makes sense. Theoretically, that api can return invalid argument error for other reasons like blob size limit exceeded. Right now should be fine though, because the fact that we never handle that error type means other cases never happen and it must be signal count limit.

I will create a task for adding the new error type, I think it's also useful for other per workflow limit we plan to enforce in the future. For this patch, I think checking invalid argument should be ok.

internal error type

I don't quite follow. Do you mean history service returns the newly defined internal error type, and frontend convert it back to invalid argument before returning to customer? Otherwise I don't see how internal error type can work.

@yycptt yycptt merged commit 1439b87 into temporalio:master Mar 22, 2023
7 checks passed
@yycptt yycptt deleted the handle-max-signal-count branch March 22, 2023 17:07
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

2 participants