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

Fixing concurrency issue in VersionSpecificWorkerContextWrapper (#6554) #6648

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Boereck
Copy link
Contributor

@Boereck Boereck commented Jan 24, 2025

When validating if a code is valid against a ValueSet, a potentially cached (and therefore shared) result object was mutated. This mutation is now done on a copy of the result object.

Without this change, there might be a concurrent modification on a cached result of validateCodeInValueSet (item added to issue list). We got ConcurrentModificationExceptions when validating resources with the same problem in parallel.

Please let me know if there is an issue with this PR. Unfortunately, due to the concurrent nature of the problem, it seems impossible to test for the absence of the fixed error deterministically.

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.51%. Comparing base (46d5809) to head (7b4ca30).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6648   +/-   ##
=========================================
  Coverage     83.50%   83.51%           
- Complexity    28566    28567    +1     
=========================================
  Files          1797     1797           
  Lines        111166   111184   +18     
  Branches      13965    13965           
=========================================
+ Hits          92828    92850   +22     
+ Misses        12351    12346    -5     
- Partials       5987     5988    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…fhir#6554)

When validating if a code is valid against a ValueSet, a potentially
cached (and therefore shared) result object was mutated. This mutation
is now done on a copy of the result object.
@Boereck Boereck force-pushed the fix/concurrency_fix branch from fd6414a to 7b4ca30 Compare February 5, 2025 08:19
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.

1 participant