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

Fix handling of CurrentWorkflowConditionFailedError when create wf #3349

Merged
merged 3 commits into from
Jun 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions service/history/shard/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ Create_Loop:
switch err.(type) {
case *shared.WorkflowExecutionAlreadyStartedError,
*persistence.WorkflowExecutionAlreadyStartedError,
*persistence.CurrentWorkflowConditionFailedError,
Copy link
Contributor

Choose a reason for hiding this comment

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

If the range ID changes, it will throw this CurrentWorkflowConditionFailedError? If it is the case, why no update the range id?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CurrentWorkflowConditionFailedError in StartWorkflow only happened when concurrent record messed up. RangeID changes will not lead to this error. That's my understanding based on reading of https://github.com/uber/cadence/blob/master/common/persistence/cassandra/cassandraPersistence.go#L1229 - L1242

Copy link
Contributor

Choose a reason for hiding this comment

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

I think @yycptt makes a point. should we retry on this error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this error will be retry by client; it should be non-retriable from history service point of view currently.

*shared.ServiceBusyError,
*persistence.TimeoutError,
*shared.LimitExceededError:
Expand Down