Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

eiriktsarpalis
Copy link
Member

The ValidationAttributeStore implementation uses a regular dictionary as a global cache that needs to lock on every lookup operation. This PR replaces it with a ConcurrentDictionary.

@ghost
Copy link

ghost commented Feb 23, 2023

Tagging subscribers to this area: @ajcvickers, @bricelam, @roji
See info in area-owners.md if you want to be subscribed.

Issue Details

The ValidationAttributeStore implementation uses a regular dictionary as a global cache that needs to lock on every lookup operation. This PR replaces it with a ConcurrentDictionary.

Author: eiriktsarpalis
Assignees: eiriktsarpalis
Labels:

area-System.ComponentModel.DataAnnotations

Milestone: 8.0.0

@eiriktsarpalis eiriktsarpalis merged commit ff7c19f into dotnet:main Feb 23, 2023
@eiriktsarpalis eiriktsarpalis deleted the dataannotation-locking branch February 23, 2023 19:48
Copy link
Member

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

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

Good catch on this. LGTM.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants