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

Added a defensive check in the getTaskListManager function #6199

Merged
merged 6 commits into from
Aug 2, 2024

Conversation

jakobht
Copy link
Member

@jakobht jakobht commented Jul 30, 2024

What changed?
Added a check whether or not we should own a shard before we steal it.

Why?
This makes sure we do not steal tasklists we do not own according to the
hashring.

How did you test it?
Unit tests, local runs, and deployment in dev environments.
I didn't see any ill effects from the change.

Potential risks
This code path is quite busy, so introducing a check might have performance impacts.

There is a risk that correct requests are rejected because the matching host has a wrong view of the hash ring. I expect this to be transient, and everything should be retried.

We introduce a new error, I have checked the callers and they should all handle unknown errors.

Release notes

Documentation Changes

Copy link

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.90%. Comparing base (9a7a8a4) to head (b659dda).
Report is 9 commits behind head on master.

Additional details and impacted files
Files Coverage Δ
service/matching/handler/engine.go 77.99% <100.00%> (+0.84%) ⬆️

... and 26 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 9a7a8a4...b659dda. Read the comment docs.

This makes sure we do not steel tasklists we do not own according to the
hashring.
@jakobht jakobht merged commit 879bbbe into cadence-workflow:master Aug 2, 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.

2 participants