You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've been using 2.0.601 for months, and only seen one instance of this - seems pretty rare.
Exception=System.NullReferenceException: Object reference not set to an instance of an object.
at StackExchange.Redis.ServerEndPoint.get_LastException()
at StackExchange.Redis.ExceptionFactory.PopulateInnerExceptions(ReadOnlySpan`1 serverSnapshot)
at StackExchange.Redis.ExceptionFactory.NoConnectionAvailable(Boolean includeDetail, Boolean includePerformanceCounters, RedisCommand command, Message message, ServerEndPoint server, ReadOnlySpan`1 serverSnapshot)
at StackExchange.Redis.ConnectionMultiplexer.GetException(WriteResult result, Message message, ServerEndPoint server)
at StackExchange.Redis.ConnectionMultiplexer.ExecuteAsyncImpl[T](Message message, ResultProcessor`1 processor, Object state, ServerEndPoint server)
at StackExchange.Redis.RedisBase.ExecuteAsync[T](Message message, ResultProcessor`1 processor, ServerEndPoint server)
at StackExchange.Redis.RedisDatabase.HashGetAllAsync(RedisKey key, CommandFlags flags)
at StackExchange.Redis.KeyspaceIsolation.WrapperBase`1.HashGetAllAsync(RedisKey key, CommandFlags flags)
I'm sorry that I'm not more familiar with this project to contribute more. My best guess is on this line:
if (tmp2?.LastException != null && tmp2.LastException.Data.Contains("Redis-FailureType") && !tmp2.LastException.Data["Redis-FailureType"].ToString().Equals(nameof(ConnectionFailureType.UnableToConnect)))
The first clause checks that LastException is not null; but maybe it can be set to null on PhysicalBridge.OnFullyEstablished, and then the later checks may be working with null? I'm not sure when that event may fire relative to execution.
Otherwise, maybe there's a way for Data to not be populated?
The text was updated successfully, but these errors were encountered:
Sounds like a race condition in the LastException getting cleared. Will make the code more defensive, i.e. snapshot the values rather than access them multiple times.
We've been using 2.0.601 for months, and only seen one instance of this - seems pretty rare.
I'm sorry that I'm not more familiar with this project to contribute more. My best guess is on this line:
The first clause checks that LastException is not null; but maybe it can be set to null on PhysicalBridge.OnFullyEstablished, and then the later checks may be working with null? I'm not sure when that event may fire relative to execution.
Otherwise, maybe there's a way for Data to not be populated?
The text was updated successfully, but these errors were encountered: