Skip to content

Fix "CallVirtual expected a StackExchange.Redis.RedisBase; found StackExchange.Redis.RedisBase"#872

Merged
zacharycmontoya merged 5 commits into
masterfrom
zach/fix/redis-strongname-async
Aug 21, 2020
Merged

Fix "CallVirtual expected a StackExchange.Redis.RedisBase; found StackExchange.Redis.RedisBase"#872
zacharycmontoya merged 5 commits into
masterfrom
zach/fix/redis-strongname-async

Conversation

@zacharycmontoya

@zacharycmontoya zacharycmontoya commented Aug 19, 2020

Copy link
Copy Markdown
Contributor

Issue

Today we still have an issue in the automatic instrumentation of StackExchange.Redis.RedisBase.ExecuteAsync. The first time this method is executed, the type of the object instance is saved and cached for speedup purposes. Unfortunately, this leads to errors when both StackExchange.Redis and StackExchange.Redis.StrongName libraries are brought into the app because they can both enter this integration method but the types are not identical because they are defined in separate assemblies.

Changes

  • Fix the StackExchange.Redis.RedisBase.ExecuteAsync method replacement to always perform a type lookup on the instance object
  • Improve our test application to exercise async code paths when both StackExchange.Redis and StackExchange.Redis.StrongName libraries are used
  • Extra: Small GraphQL edit which removes unused code path

@DataDog/apm-dotnet

…sync method and using both StackExchange.Redis and StackExchange.Redis.StrongName assemblies
…ch can lead to type issues when both StackExchange.Redis and StackExchange.Redis.StrongName assemblies are loaded
@zacharycmontoya zacharycmontoya added type:bug area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed) labels Aug 19, 2020
@zacharycmontoya
zacharycmontoya requested a review from a team as a code owner August 19, 2020 22:20
@zacharycmontoya zacharycmontoya self-assigned this Aug 19, 2020
@zacharycmontoya
zacharycmontoya merged commit 3d62e0e into master Aug 21, 2020
@zacharycmontoya
zacharycmontoya deleted the zach/fix/redis-strongname-async branch August 21, 2020 17:24
@zacharycmontoya zacharycmontoya added this to the 1.19.2 milestone Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed) type:bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants