-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Synchronize access to System.ComponentModel.DataAnnotations.Validator
#2428
base: main
Are you sure you want to change the base?
Conversation
@dotnet-policy-service agree |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2428 +/- ##
=======================================
Coverage 85.39% 85.39%
=======================================
Files 312 312
Lines 7464 7464
Branches 1121 1121
=======================================
Hits 6374 6374
Misses 905 905
Partials 185 185
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
It would be good to quantify what, if any, impact this has on performance by running the benchmarks before and after the change to see if there's any impact from introducing the lock (I'd hope not as it's on construction not execution).
Apply changes from App-vNext#2428.
I ran the benchmarks for main and then this PR on my laptop to get a consistent baseline to compare (diff) and as expected there's no discernible difference, it's just noise. Once some CI-related infrastructure changes are sorted out and merged, then I'll merge this 👍 |
That change has been made now - you just need to rebase/merge with main. |
Pull Request
The issue or feature being addressed
[Bug]: InvalidCastException when multiple threads retrieve pipeline
Details on the issue fix or feature implementation
.NET team has targeted a fix in v10 of the runtime. In the meantime, I've opted for a simple workaround that synchronizes validation calls for all strategy options models (these are the only ones that use
RangeAttribute
). Given this only occurs when a pipeline is first built, I don't feel like we need to be concerned about contention.Confirm the following