pulumi / pulumi-dotnet

.NET support for Pulumi
Apache License 2.0
28 stars 25 forks source link

Fix race condition in GrpcMonitor's GrpcChannel management #304

Closed algompluecker closed 4 months ago

algompluecker commented 4 months ago

While creating integration tests I faced a race condition in GrpcMonitor when the channel retrieved from the static _monitorChannels was null although the key had already been set. Replacing the complex implementation with custom locking by the standard pattern ConcurrentDictionary<K, Lazy> has resolved this.