Closed
Bug 1148504
Opened 10 years ago
Closed 10 years ago
Protect Firefox Account state with a critical section
Categories
(Android Background Services Graveyard :: Reading List Sync, defect)
Tracking
(firefox38 fixed, firefox39 fixed)
RESOLVED
FIXED
Firefox 39
People
(Reporter: nalexander, Assigned: nalexander)
References
Details
Attachments
(1 file)
We now have two (background) Firefox Account consumers, Sync and RL. Due to time pressure, we haven't implemented a nice API for them both to update the account state; instead, they both try to own the state, resulting in races. The effect is most noticeable when an account is created or re-connected: it's frequent that both consumers will try to fetch keys using the same keyFetchToken; one will win the race and proceed to start syncing; the other will fail to fetch keys and drive the account to Separated (in order to fetch keys). Result: a terrible user experience.
As a step towards a better API, we need to protect the Account state with a critical section. Eventually, we transition Sync to requesting token server tokens from the FxAccountAuthenticator using Android's APIs, which makes this much cleaner (since there's then a single consumer to handle locking).
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•10 years ago
|
||
rnewman: how do you feel about this? It's working well locally.
I intended to include telemetry for how long we wait and how long we hold the lock, but I then observed (and explained in the second commit comment) that we should very rarely wait.
Attachment #8584688 -
Flags: review?(rnewman)
Assignee | ||
Updated•10 years ago
|
Summary: Protected Firefox Account state with a critical section → Protect Firefox Account state with a critical section
Assignee | ||
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
Comment 4•10 years ago
|
||
Assignee | ||
Comment 5•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 39
Comment 6•10 years ago
|
||
status-firefox38:
--- → fixed
Updated•10 years ago
|
Attachment #8584688 -
Flags: review?(rnewman) → review+
You need to log in
before you can comment on or make changes to this bug.
Description
•