-
Notifications
You must be signed in to change notification settings - Fork 14
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
Make FailingSnapshotManager Thread Safe #70
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for this! Could you target our trunk branch with this PR please
pathetic-model/src/main/java/org/patheloper/model/snapshot/FailingSnapshotManager.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - @GodCipher can final approval and merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for the fix tho! Once the import is removed we will merge this into pathetic :)
Problem Description
When running multiple path searches at the same time from different threads, the
FailingSnapshotManager
throws the following error:Proposed solution is to change the data structure of the
SNAPSHOTS_MAP
from a unsafeMap
to a thread safeConcurrentMap
.This pull request does just that.