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

Address map access data race in matching engine #5477

Merged

Conversation

taylanisikdemir
Copy link
Member

What changed?
A PR check test was failing due to unprotected access to taskLists by multiple goroutines. Handling it by deferring unlock which is generally safer way to use mutex.

Misc changes:

  • Get rid of inconsistent/unnecessary usage of multilines. Hurts vertical readability speed.

Why?
Avoid data race. This will also decrease flakiness of the tests.

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.

Good catch. I wonder how we did not see it in prod.

@taylanisikdemir
Copy link
Member Author

Good catch. I wonder how we did not see it in prod.

This happens during tasklist stop flow so not likely to hit or detect in prod.

@taylanisikdemir taylanisikdemir merged commit 05b7dbf into cadence-workflow:master Dec 13, 2023
16 checks passed
@taylanisikdemir taylanisikdemir deleted the taylan/matching_race branch December 13, 2023 19:41
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.

3 participants