-
Notifications
You must be signed in to change notification settings - Fork 869
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
Remove SkipGenerateWorkflowTask from signal APIs #6810
Remove SkipGenerateWorkflowTask from signal APIs #6810
Conversation
d1712e9
to
164cc98
Compare
164cc98
to
3a151d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but would like someone from CGS to double check the reapply logic.
@@ -472,16 +472,11 @@ func (handler *WorkflowTaskCompletedHandler) Invoke( | |||
} | |||
} | |||
|
|||
bufferedEventShouldCreateNewTask := hasBufferedEventsOrMessages && ms.HasAnyBufferedEvent(eventShouldGenerateNewTaskFilter) | |||
if hasBufferedEventsOrMessages && !bufferedEventShouldCreateNewTask { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there is buffer events, we should still flush those events?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Buffered events are flushed when new WFT is scheduled. This code was just to flush them if new WFT will not be created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The event reapply logic LGTM
What changed?
Remove
SkipGenerateWorkflowTask
flag from signal APIs request. Some sort of revert of #4091.Why?
This flag breaks important system invariant: Workflow history must end with Workflow Task event OR event that is no-op for SDK (such as
ActivityScheduled
orTimerStarted
). This invariant will be leverage at #6709 where server must guarantee that it won't ship actual (non command) events to the worker twice.PR to remove flag from APIs: temporalio/api#476.
How did you test it?
Existing tests.
Potential risks
Although this flag is not exposed by any SDK and not documented, there is a chance that someone use it in production scenarios. For them it will be a breaking change.
Documentation
Not documented.
Is hotfix candidate?
No.