-
Notifications
You must be signed in to change notification settings - Fork 911
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
Expose history size to workflows #3055
Changes from 1 commit
e237199
6d35260
40e1e43
61b74a8
62824cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,6 +89,13 @@ type ( | |
|
||
// Indicate type of the current workflow task (normal, transient, or speculative). | ||
Type enumsspb.WorkflowTaskType | ||
|
||
// These two fields are sent to workers in the WorkflowTaskStarted event. We need to save a | ||
// copy here to ensure that we send the same values with every transient WorkflowTaskStarted | ||
// event, otherwise a dynamic config change of the suggestion threshold could cause the | ||
// event that the worker used to not match the event we saved in history. | ||
SuggestContinueAsNew bool | ||
HistorySizeBytes int64 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you trying to make history deterministic? I don't think it is necessary. First of all SDKs can ignore these fields in non-determinism detector same way as they do for activity arguments. But even if they don't, SDK will just replay history from the beginning which is ok for workflows with continuously failing WT. I think SDK already does it (may be not). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But you still need these fields just to pass this data around. All WT related fields from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as we discussed: they can change across attempts, but we do need to keep them and can't just recompute them because of determinism. updated comment |
||
} | ||
|
||
MutableState interface { | ||
|
@@ -224,7 +231,7 @@ type ( | |
ReplicateWorkflowTaskCompletedEvent(*historypb.HistoryEvent) error | ||
ReplicateWorkflowTaskFailedEvent() error | ||
ReplicateWorkflowTaskScheduledEvent(int64, int64, *taskqueuepb.TaskQueue, *time.Duration, int32, *time.Time, *time.Time, enumsspb.WorkflowTaskType) (*WorkflowTaskInfo, error) | ||
ReplicateWorkflowTaskStartedEvent(*WorkflowTaskInfo, int64, int64, int64, string, time.Time) (*WorkflowTaskInfo, error) | ||
ReplicateWorkflowTaskStartedEvent(*WorkflowTaskInfo, int64, int64, int64, string, time.Time, bool, int64) (*WorkflowTaskInfo, error) | ||
ReplicateWorkflowTaskTimedOutEvent(enumspb.TimeoutType) error | ||
ReplicateExternalWorkflowExecutionCancelRequested(*historypb.HistoryEvent) error | ||
ReplicateExternalWorkflowExecutionSignaled(*historypb.HistoryEvent) error | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Oh.. Attributes are already there for half a year.