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

Fix threadsafety in DataServiceClient EntityTracker's internal dictionary #1199

Closed
wants to merge 7 commits into from

Conversation

mikepizzo
Copy link
Member

Issues
This pull request fixes issue #1043 and is a resubmit of PR #1054 with CR comments addressed.

Description
Replaces EntityTracker's internal Dictionary<> objects with thread-safe ConcurrentDictionary<> ones.

Checklist (Uncheck if it is not completed)
Test cases added
Build and test with one-click build and test script passed

@mikepizzo mikepizzo changed the title Threadsafety 1043 Fix threadsafety in DataServiceClient EntityTracker's internal dictionary Jun 26, 2018
@mikepizzo mikepizzo requested a review from biaol-odata June 26, 2018 03:54
@mikepizzo mikepizzo added this to the OData Lib 7.5 milestone Jun 26, 2018
@biaol-odata
Copy link
Contributor

biaol-odata commented Jun 26, 2018

@mikepizzo The branch threadsafety-1043 was created in the master repo, but it is supposed to be a branch in your forked repo. Can you please re-create it (git push <mikep's origin> branch-name) so that CI build can be done?

@@ -85,6 +86,23 @@ internal static class DictionaryExtensions

return false;
}
#else
/// <summary>
/// Convenience function that wraps ConcurrentDictionary.TryAdd() to allow same signature as IDictionary
Copy link
Contributor

@biaol-odata biaol-odata Jun 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Add <throws> to note the difference between the underneath TryAdd?

update: <throws> (escaped brackets)

Copy link
Contributor

@biaol-odata biaol-odata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please re-create the PR in forked repo.

@mikepizzo
Copy link
Member Author

PR #1200 moves this to separate branch for CI to work correctly.

@mikepizzo mikepizzo closed this Jun 26, 2018
@mikepizzo mikepizzo deleted the threadsafety-1043 branch June 26, 2018 19:42
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