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

Addressed sync issue in workflow cache #5605

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

jakobht
Copy link
Member

@jakobht jakobht commented Jan 18, 2024

What changed?
We now use the value returned from PutIfExists, this is thread safe, either the new value is inserted and returned, or the existing value is returned.
We also do not need to pin values in the cache, if they get evicted while we use them that is fine.
Added some more error handling, the error handling should never be triggered though.

Why?
The old implementation had a race condition in creating the value and inserting it

How did you test it?

Potential risks
There could still be concurrency issues

Release notes

Documentation Changes

@coveralls
Copy link

coveralls commented Jan 18, 2024

Pull Request Test Coverage Report for Build 018d20b3-7a4a-4287-b86c-06a61e7c0729

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.07%) to 62.628%

Totals Coverage Status
Change from base Build 018d1cb2-350a-4641-8f29-7016c0799063: -0.07%
Covered Lines: 91594
Relevant Lines: 146252

💛 - Coveralls

@jakobht jakobht merged commit e253ca5 into cadence-workflow:master Jan 19, 2024
16 checks passed
@jakobht jakobht deleted the cacheMutex branch January 19, 2024 08:49
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