Open SebastienGautier opened 1 week ago
I am putting this to the next sprint plan.
Hello @SebastienGautier,
I believe this issue occurred because the writeStatsToDatastore setting was disabled at some point, preventing the database from being updated. Here's how it works: the system calculates the viewer difference(can be positive or negative) and adds it to the current viewer count in the database. User sessions which are not updated for 20 seconds are considered dead and its -1 for hls viewer count. If you can provide more details about your use case and how this issue occurred, it will help me better understand the root cause.
In the meantime, we will implement a code change to ensure that the viewer count never falls below 0, as negative value is meaningless.
Short description
We have some streams that have a negative HLS viewer count
Environment
Steps to reproduce
Expected behavior
HLS viewer count should never be negative
Actual behavior
HLS viewer count is negative for some streams
We had writeStatsToDatastore set to false for some time if that could be related
Logs
Nothing that looks related
Ask your questions on Ant Media Github Discussions