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

yarpcerrors not mapped to Cadence errors in Go client #4976

Open
rkumpf opened this issue Aug 26, 2022 Discussed in #4960 · 0 comments
Open

yarpcerrors not mapped to Cadence errors in Go client #4976

rkumpf opened this issue Aug 26, 2022 Discussed in #4960 · 0 comments

Comments

@rkumpf
Copy link

rkumpf commented Aug 26, 2022

Discussed in #4960

Originally posted by rkumpf August 18, 2022
Using the Go client (versions 0.18.5 and 0.19.1), a call to Client.DescribeWorkflowExecution for a non-existent workflow ID has a one minute delay before returning a CodeNotFound error.

The delay is caused by retries that should have been avoided by this code in the isServiceTransientError function (https://github.com/uber-go/cadence-client/blob/master/internal/internal_retry.go#L92-L94)

	if target := (*s.EntityNotExistsError)(nil); errors.As(err, &target) {
		return false
	}

The delay is avoided when the isServiceTransientError function is updated to include:

	if status := yarpcerrors.FromError(err); status != nil && status.Code() == yarpcerrors.CodeNotFound {
		return false
	}

Maybe this is a symptom of a general problem where errors returned via Thrift are not mapped correctly to Cadence errors.

Is my understanding correct? Is there any way to avoid a delay in the EntityNotExistsError case without short-circuiting retries for real transient errors?

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

No branches or pull requests

1 participant