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
Let's say if you run avalanche with the following arguments
- --metric-count=1
- --series-count=1
- --label-count=1
- --metricname-length=10
- --labelname-length=10
- --value-interval=60 # 1 min
- --series-interval=300 # 5 min
- --metric-interval=86400 # 1 day
The expectation is that there will be 1 timeseries and every 5 minutes old timeseries will be deleted and a new timeseries will be created. However, due to a race condition in the code, new timeseries will be created and old timeseries will be kept.
The race condition is between the goroutine for value tick and series tick. On the 5th minute, both will fire and create a race condition because series goroutine does 3 things which may interleave with the work that value goroutine does.
One way to fix the race condition will be to not use 3 goroutines but instead use a select.
The text was updated successfully, but these errors were encountered:
Let's say if you run avalanche with the following arguments
The expectation is that there will be 1 timeseries and every 5 minutes old timeseries will be deleted and a new timeseries will be created. However, due to a race condition in the code, new timeseries will be created and old timeseries will be kept.
The race condition is between the goroutine for value tick and series tick. On the 5th minute, both will fire and create a race condition because series goroutine does 3 things which may interleave with the work that value goroutine does.
One way to fix the race condition will be to not use 3 goroutines but instead use a select.
The text was updated successfully, but these errors were encountered: