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

Enforce stricter per workflow limit #4326

Merged
merged 1 commit into from May 12, 2023

Conversation

yycptt
Copy link
Member

@yycptt yycptt commented May 12, 2023

What changed?
Enforce stricter default per workflow limit based on our operational experience
More specifically, by default,

  • one workflow can receive at most 10k signals
  • one workflow can have at most 2k pending activities, childworkflow, signal external workflow or cancel external workflow commands.
    This PR only changes the default value, user can still set override to those configurations.

NOTE: there's no partial acceptance of workflow task response, meaning if a workflow task tries to schedule 3k activities and pending activity limit is 2k, 0 activity will be scheduled. Workflow task will be failed & workflow will enter a stuck state.

To check current usage,

  • For 10k signal per workflow limit: check total_signal_count metric (for all operation tag values)
  • For those 2k limits, check activity_info_count, child_info_count, signal_info_count & request_cancel_info_count metric with operation=ExecutionStats

How do I know if those limits are exceeded?

  • For the 10k signal limit, new signals will be rejected with InvalidArgument (for now)
  • For those 2k limit, wf_too_many_pending_child_workflows, wf_too_many_pending_activities, wf_too_many_pending_cancel_requests, wf_too_many_pending_external_workflow_signals metric will be emitted.

Why?

  • Consistency

How did you test it?
N/A

Potential risks

  • Will break existing workflow implementations

Is hotfix candidate?

  • No

@yycptt yycptt requested a review from yiminc May 12, 2023 01:51
@yycptt yycptt marked this pull request as ready for review May 12, 2023 01:51
@yycptt yycptt requested a review from a team as a code owner May 12, 2023 01:51
@yycptt yycptt enabled auto-merge (squash) May 12, 2023 02:00
Copy link
Contributor

@MichaelSnowden MichaelSnowden left a comment

Choose a reason for hiding this comment

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

Please make sure you update our documentation on workflow size limits, and that you also include this in the release notes because it will likely break some users.

@yycptt yycptt merged commit cd8821c into temporalio:master May 12, 2023
9 checks passed
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

3 participants