Azure / Azure/durabletask

IndexOutOfRangeException in DisconnectedPerformanceMonitor.PulseAsync()

Open
#916 2 comments 0 reactions 1 assignee Claimed by @nytian View on GitHub
Dominant language
C#
Stars
1.7k
Forks
335
Avg merge
2d 23h
Merged PRs (30d)
6

Description

I'm periodically calling DisconnectedPerformanceMonitor.PulseAsync() to collect statistics on my TaskHubs.

Every now and then I encounter an IndexOutOfRange exception with the following stack:

```
ClientCommandRequest: Details=System.IndexOutOfRangeException: Index was outside the bounds of the array.
at DurableTask.AzureStorage.Monitoring.DisconnectedPerformanceMonitor.QueueMetricHistory.Add(Int32 value) in /_/src/DurableTask.AzureStorage/Monitoring/DisconnectedPerformanceMonitor.cs:line 558
at DurableTask.AzureStorage.Monitoring.DisconnectedPerformanceMonitor.d__29.MoveNext() in /_/src/DurableTask.AzureStorage/Monitoring/DisconnectedPerformanceMonitor.cs:line 188
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at DurableTask.AzureStorage.Monitoring.DisconnectedPerformanceMonitor.d__28.MoveNext() in /_/src/DurableTask.AzureStorage/Monitoring/DisconnectedPerformanceMonitor.cs:line 138
--- End of stack trace from previous location where exception was thrown ---
...
```

This looks like a race condition somewhere.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.