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

Add shard not owned error #6233

Merged
merged 6 commits into from
Aug 27, 2024

Conversation

jakobht
Copy link
Member

@jakobht jakobht commented Aug 16, 2024

NOTE: This PR: cadence-workflow/cadence-idl#179 needs to be merged before this one. This one then needs to be updated to reference the correct commit on the main branch in the IDL repo.

What changed?

  • Added a new error type returned from matching, TaskListNotOwnedByHostError in thrift and proto IDLs
  • We do not log errors on this error as it's an expected transient error

Why?

  • We have to propagate the error type over the wire so we can check the error type on the history side, to be able to handle it gracefully.
  • We should not have error logs on this error as it is expected and transient.

How did you test it?

  • Unit tests
  • Deployment in staging environment

Potential risks

Release notes

Documentation Changes

Copy link

codecov bot commented Aug 16, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 5 lines in your changes missing coverage. Please review.

Project coverage is 73.02%. Comparing base (ac349fc) to head (facd131).
Report is 2 commits behind head on master.

Files Patch % Lines
service/matching/handler/context.go 0.00% 3 Missing ⚠️
common/util.go 71.42% 2 Missing ⚠️
Additional details and impacted files
Files Coverage Δ
common/types/mapper/proto/errors.go 100.00% <100.00%> (ø)
common/types/mapper/thrift/errors.go 100.00% <100.00%> (ø)
common/types/mapper/thrift/shared.go 97.71% <100.00%> (+<0.01%) ⬆️
service/history/task/task.go 79.52% <100.00%> (+0.39%) ⬆️
common/util.go 81.16% <71.42%> (-0.26%) ⬇️
service/matching/handler/context.go 43.63% <0.00%> (-2.52%) ⬇️

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac349fc...facd131. Read the comment docs.

service/matching/handler/engine.go Outdated Show resolved Hide resolved
service/matching/handler/engine.go Outdated Show resolved Hide resolved
Copy link
Member

@dkrotx dkrotx left a comment

Choose a reason for hiding this comment

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

with nit

service/matching/handler/engine.go Outdated Show resolved Hide resolved
@dkrotx
Copy link
Member

dkrotx commented Aug 20, 2024

@jakobht does it require specific order or rollout? Like frontend,history being rolled out before matching?
How Cadence clients react to this error? I expect this to be only within history<->matching and frontend<->matching. What frontend returns to clients as the result of hitting this error twice - no tasks?

@jakobht
Copy link
Member Author

jakobht commented Aug 26, 2024

@dkrotx Ideally it would be frontend -> history -> matching.

But we will just get some log spam if not - so it's safe to do in any order. I don't think it's worth it to do any custom rollout.

Copy link
Contributor

@3vilhamster 3vilhamster left a comment

Choose a reason for hiding this comment

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

Looks good. This is a clear miss

@jakobht jakobht force-pushed the addShardNotOwnedError branch from 5beccc4 to f1cca46 Compare August 27, 2024 11:08
@jakobht jakobht force-pushed the addShardNotOwnedError branch from f1cca46 to 376eac1 Compare August 27, 2024 11:39
@jakobht jakobht force-pushed the addShardNotOwnedError branch from 37fa1a1 to facd131 Compare August 27, 2024 12:11
@jakobht jakobht merged commit 6ba8ad8 into cadence-workflow:master Aug 27, 2024
20 checks passed
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

Successfully merging this pull request may close these issues.

5 participants