Repository navigation
Conversation
Member
|
Real long-standing gotcha — deserializers compiled before AddTypeHandler silently ignored the handler forever, and your full-purge reasoning is right (a handled type can be a member of any cached type, so a per-type purge can't work). Adopted in #2272, gated so static-init registrations skip the purge, with a deterministic register-after-compile test on in-repo infrastructure. See #2199 for the note on the test dependency. Thanks! |
mgravell
added a commit
that referenced
this pull request
Nov 20, 2026
…tatic properties, and type-map races (#2272) Five small fixes, each identified by community PRs (credit: alaricd), re-tested on the repo's existing test infrastructure: - DbWrappedReader.DisposeAsync now disposes the wrapped command, mirroring the sync Dispose path; 'await using' on an ExecuteReaderAsync result previously leaked the command (#2185, community PR #2264) - QueryMultiple / QueryMultipleAsync now pass custom IParameterCallbacks implementations to the GridReader, not just DynamicParameters, so OnCompleted fires for them (#2179, community PR #2257, extended to the async call site) - AddTypeHandler purges compiled deserializer caches: a handler registered after a deserializer was compiled for a containing type is now honored (community PR #2247) - public static properties on parameter objects are ignored: the emitted IL loads the instance before each getter call, which is an invalid program for a static getter (community PR #2254) - AddTypeMap / RemoveTypeMap clone-and-swap now happens under a lock, so concurrent registrations cannot lose each other's updates (community PR #2251) Fixes #2179, fixes #2185
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #885.
Adding a type handler after a query is cached must invalidate cached deserializers, including deserializers for types that use the handled type as a member.
This adds a fakeDb regression test and purges the query/deserializer caches when handlers change.