Repository navigation
[MOB-21074] Fix threading issues during map updates in updateProposition - #87
Merged
Merged
Conversation
spoorthipujariadobe
requested changes
Jul 24, 2024
spoorthipujariadobe
left a comment
Contributor
There was a problem hiding this comment.
Could you please fix the lint errors?
siddique-adobe
force-pushed
the
MOB-21074
branch
from
July 25, 2024 06:16
30698ca to
c1b51d2
Compare
…ionsInProgress hashmaps to static and final hashmaps
siddique-adobe
commented
Jul 26, 2024
spoorthipujariadobe
approved these changes
Jul 26, 2024
spoorthipujariadobe
left a comment
Contributor
There was a problem hiding this comment.
Pending approval from Praveen
spoorthipujariadobe
requested changes
Jul 26, 2024
Contributor
There was a problem hiding this comment.
Looking at this a bit more, I still don't think it is thread-safe. cachedPropositions is read from a different thread than the Optimize extension one, inside the SerialWorkDispatcher. We might also need to use ConcurrentHashMap for that. Thoughts?
…ConcurrentHashMap for update and get Propostions
praveek
reviewed
Jul 31, 2024
praveek
reviewed
Jul 31, 2024
praveek
reviewed
Jul 31, 2024
praveek
reviewed
Jul 31, 2024
praveek
requested changes
Jul 31, 2024
praveek
left a comment
Contributor
There was a problem hiding this comment.
Similar changes are also needed for cachedPropositions as it is also accessed from multiple threads.
…ucture of cachedPropositions to ConcurrentHashMap from hashmap
praveek
reviewed
Jul 31, 2024
…ization and updating the comments accordingly
praveek
reviewed
Aug 1, 2024
spoorthipujariadobe
approved these changes
Aug 6, 2024
praveek
approved these changes
Aug 6, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Changing the hash map to concurrent hash map in order to ensure the thread safety and avoid the race condition
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: