Closed Bug 1207575 Opened 9 years ago Closed 9 years ago

Connection status and counts of connections/streams reported to the server gets messed up if the standalone re-connects without reloading

Categories

(Hello (Loop) :: Client, defect, P2)

defect
Points:
2

Tracking

(firefox44 fixed)

RESOLVED FIXED
mozilla44
Iteration:
44.1 - Oct 5
Tracking Status
firefox44 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

(Whiteboard: [metrics])

Attachments

(1 file)

In looking at various logs, I've just noticed our connection status accounting can go wrong. STR:

1) Setup a browser as a link-clicker, load the web page and monitor the web console with debugging enabled (enter in the console, no quotes: `localStorage.setItem("debug.dispatcher", true);` )
2) Setup a second browser and get the rooms talking
3) On the link clicker browser add a filter for "connectionStatus"
4) On the link clicker browser select File -> Work Offline.

=> At this stage the link clicker connection is aborted, says "something went wrong"

5) Select File -> Work Offline again to go back online
6) Select Retry

=> The room is reconnected.

Expected Results:

- in the connectionStatus message, the connections, sendStreams and recvStreams have been reset to zero and start from there.

Actual Results

- connectionStatus stats continue from where they left off, so we now get connections = 3, even though there aren't.
Ok, its slightly worse that what I thought. Any multiple attempts to join the room via the standalone without reloading the page, will cause the counts to go weird.

If there's no-one in the room when the standalone exits and then rejoins, then just the sendStreams value is incorrect and keeps being incremented by 1.

If someone else is in the room then all the counts get incorrectly incremented.
Summary: Connection status reported to the server gets messed up if there's a failure on the standalone and the connection is retried → Connection status and counts of connections/streams reported to the server gets messed up if the standalone re-connects without reloading
When we disconnect from the session, we're not currently clearing the metrics. As we don't wait for all the disconnect events, that means that the metrics don't get cleared down.

This patch makes us reset the metrics when we disconnect. I've done some testing locally and it seems to be working much better.
Attachment #8665061 - Flags: review?(edilee)
Rank: 25
Whiteboard: [metrics]
Attachment #8665061 - Flags: review?(edilee) → review+
https://hg.mozilla.org/mozilla-central/rev/5505a568b484
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: