Closed Bug 1368393 Opened 7 years ago Closed 7 years ago

Clients engine doesn't handle duplicate commands correctly, causing multiple events to be "sent" but only one "received"

Categories

(Firefox :: Sync, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 56
Tracking Status
firefox56 --- fixed

People

(Reporter: markh, Assigned: tcsc)

Details

Attachments

(1 file)

STR:
* On one device, send the same tab to the same device multiple times. Restart, check about:telemetry, notice there are multiple events, each with different flow IDs written for these sends.

* Start the target device, sync. Notice the incoming tab is only opened once. Restart, check about:telemetry, notice that only 1 event for the receive is recorded.

This will cause our telemetry to report a poor success rate - we have multiple sends but only 1 receive.

What's happening is:

* We expect http://searchfox.org/mozilla-central/rev/66d9eb3103e429127c85a7921e16c5a02458a127/services/sync/modules/engines/clients.js#576 to notice the duplicate - however, that fails to work because the commands have already been synced - so we go ahead and write a new event.

* However, the duplicates *are* discarded at http://searchfox.org/mozilla-central/rev/66d9eb3103e429127c85a7921e16c5a02458a127/services/sync/modules/engines/clients.js#873 - but at this time we have already written the "event" to the sync ping.

This will be true for all commands (ie, including repair commands).
Priority: -- → P1
Assignee: nobody → tchiovoloni
Comment on attachment 8876187 [details]
Bug 1368393 - Handle already synced commands in clients collection duplicate checking

Sorry for taking so long with this, but I want to give it a good look. Ed, can you please review it too, given I think it's your code originally?
Attachment #8876187 - Flags: review?(eoger)
Comment on attachment 8876187 [details]
Bug 1368393 - Handle already synced commands in clients collection duplicate checking

https://reviewboard.mozilla.org/r/147618/#review154196

Woops, I thought I commented on that this morning. Looks great!
Attachment #8876187 - Flags: review?(eoger) → review+
Comment on attachment 8876187 [details]
Bug 1368393 - Handle already synced commands in clients collection duplicate checking

https://reviewboard.mozilla.org/r/147618/#review154924

thanks!
Attachment #8876187 - Flags: review?(markh) → review+
Pushed by tchiovoloni@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e87b8b55577a
Handle already synced commands in clients collection duplicate checking r=eoger,markh
https://hg.mozilla.org/mozilla-central/rev/e87b8b55577a
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: