Skip to content

CSHARP-5633: BsonSerializer.IsTypeDiscriminated is not thread-safe #1722

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

papafe
Copy link
Contributor

@papafe papafe commented Jul 10, 2025

@papafe papafe requested a review from a team as a code owner July 10, 2025 15:47
@papafe papafe added the bug label Jul 10, 2025
@papafe papafe requested review from ajcvickers and removed request for a team July 10, 2025 15:47
@BorisDog BorisDog requested a review from sanych-sun July 10, 2025 16:27
return true;
}

__configLock.EnterReadLock();
Copy link
Member

Choose a reason for hiding this comment

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

Could you please double-check if introducing this synchronization affects performance. If so, we could replace HashSet<Type> with ConcurrentDictionary<Type, bool>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants