Removed expiration from RetryPolicy and added one more workflow timeout#35
Removed expiration from RetryPolicy and added one more workflow timeout#35mfateev merged 6 commits intotemporalio:masterfrom
Conversation
…edAsNewEventAttributes
alexshtin
left a comment
There was a problem hiding this comment.
And I have to left your favourite feedback here: dots at the end of comment lines are missed :-)
decision/message.proto
Outdated
| int32 startToCloseTimeoutSeconds = 9; | ||
| // Maximum time between successful worker heartbeats. | ||
| int32 heartbeatTimeoutSeconds = 10; | ||
| // Retry parameters. Note that activity is retried by default according to a default retry policy. |
There was a problem hiding this comment.
| // Retry parameters. Note that activity is retried by default according to a default retry policy. | |
| // Activity retry policy. Note that activity is retried by default according to a default retry policy. |
| // Maximum time an activity is allowed to execute after a pick up by a worker. | ||
| // This timeout is always retriable. Either this or scheduleToCloseTimeoutSeconds is required. | ||
| int32 startToCloseTimeoutSeconds = 9; | ||
| // Maximum time between successful worker heartbeats. |
There was a problem hiding this comment.
I would add required/optional and if optional what is default? The same way as you did for all 3 above.
event/message.proto
Outdated
| string firstExecutionRunId = 17; | ||
| common.RetryPolicy retryPolicy = 18; | ||
| int32 attempt = 19; | ||
| int64 workflowExecutionTimeoutTimestamp = 20; |
There was a problem hiding this comment.
Timeout is an interval. TimeoutTimestamp looks weird to me. I believe "expiration" is a better word here. workflowExecutionExpirationTimestamp or even workflowExecutionAbsoluteExpirationTimestamp.
| string identity = 9; | ||
| string requestId = 10; | ||
| common.WorkflowIdReusePolicy workflowIdReusePolicy = 11; | ||
| // Retries up to workflowExecutionTimeout |
There was a problem hiding this comment.
| // Retries up to workflowExecutionTimeout | |
| // Retries up to workflowExecutionTimeoutSeconds |
| int32 heartbeatTimeoutSeconds = 16; | ||
| // This is an actual retry policy the service uses. | ||
| // It can be different from the one provided (or not) during activity scheduling | ||
| // as the service can override the provided one with default values. |
There was a problem hiding this comment.
Usually it is vice versa: "provided values override default values". I think better explanation why and when service ignores provided values.
RetryPolicy.expirationIntervalInSecondsspecified for how long the retry policy should keep retrying. The problem is that activity already hasScheduleToClosetimeout that specifies for how long a workflow is willing to wait for an activity completion. This required extending theScheduleToCloseup toRetryPolicy.expirationIntervalby the server which was extremely confusing for users.For workflows
RetryPolicy.expirationIntervalInSecondslimited the duration of retries. At the same time there was no way to limit workflow duration os a cron workflow or a workflow that keeps calling continue as new.This change:
expirationIntervalInSecondsfromRetryPolicyexecutionStartToCloseTimeoutSecondstoworkflowRunTimeoutSecondsworkflowExecutionTimeoutSecondsFrom now on the server is expected to retry activities up to
ScheduleToClosetimeout.The workflow duration is limited to
workflowExecutionTimeoutSecondsacross all the retries and calls to continue as new. The duration of a single run is limited up toworkflowRunTimeoutSeconds.The other expected server change is that an activity should be given a default retry policy and retried by default unless the
retryPolicy. maximumAttemptsis not set to 1.