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 exception on sequential single/first call to different types #91

Merged
merged 1 commit into from May 13, 2024

Conversation

damieng
Copy link
Member

@damieng damieng commented May 10, 2024

A late change in 8.0.0 included a workaround for logging first/single calls which uses reflection.

Unfortunately the caching mechanism fails on subsequent calls when the underlying query type changes and the MongoClientWrapper is being reused.

This stops trying to cache the reflection of the methodinfo. A newer version of the Mongo C# Driver will remove the need to reflect entirely.

Also took the opportunity to increase test coverage.

Fixes EF-120

@damieng damieng requested a review from a team as a code owner May 10, 2024 20:06
@damieng damieng requested a review from JamesKovacs May 10, 2024 20:06
@damieng damieng changed the title Fix exception caused by sequential single/first calls Fix exception on sequential single/first call to different types May 10, 2024
Copy link
Member

@sanych-sun sanych-sun left a comment

Choose a reason for hiding this comment

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

LGTM

@damieng damieng merged commit 88fdc77 into mongodb:main May 13, 2024
33 checks passed
@damieng damieng deleted the ef-120 branch May 13, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants