Closed
Bug 1216319
Opened 9 years ago
Closed 9 years ago
Clear mTime from asyncStorage in Sync app after DataStore clear
Categories
(Firefox OS Graveyard :: Sync, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
FxOS-S10 (30Oct)
People
(Reporter: mbdejong, Assigned: mbdejong)
References
Details
Attachments
(1 file)
The TV will send a command to clear all local data from the Sync app when the user logs out of FxA (and therefore disables Sync). When this command is received, all data should be wiped from Kinto.js, localStorage, and all DataStores to which the sync app has access (the TV browser will keep its local bookmarks/history outside the applicable DataStores).
Assignee | ||
Updated•9 years ago
|
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
New plan: listen for DataStore#clear operations, and react to that instead of getting the command through IAC.
Assignee | ||
Updated•9 years ago
|
Priority: P2 → P1
Assignee | ||
Comment 3•9 years ago
|
||
Changed this so that it only clears `mTime` from `asyncStorage`. That's enough to make sure the DataStore is repopulated on next sync for that userId. Should this operation fail, then on next logout/login it will be repeated. It's not easy to see the last operation for a DataStore (you have to cursor through all the history), so instead I'm checking if the DataStore has zero records. I created follow-up bug 1218420 in case we want to clear more than just the mTime, so that maybe we can get out of some data corruption situations, but that requires more thought to see how we can make that work both on the TV and on the phone (where the DataStore is never cleared).
Assignee | ||
Updated•9 years ago
|
Summary: Support clearing data in Sync app → Clear mTime from asyncStorage in Sync app after DataStore clear
Assignee | ||
Updated•9 years ago
|
Attachment #8676635 -
Flags: review?(ferjmoreno)
Comment 5•9 years ago
|
||
Comment on attachment 8676635 [details] [review] [gaia] michielbdejong:1216319-clear-command > mozilla-b2g:master Unfortunately, checking the size of the DataStore is probably not enough :( I left a comment on the PR
Attachment #8676635 -
Flags: review?(ferjmoreno) → review-
Assignee | ||
Comment 6•9 years ago
|
||
Comment on attachment 8676635 [details] [review] [gaia] michielbdejong:1216319-clear-command > mozilla-b2g:master Can you give me feedback on the approach? I changed it so that the clear is done the next time the user comes back, it's safer when a retry is needed. For read-write we will need to store the lastRevisionId per userid anyway, so that makes this code more reusable. Will write the unit tests now. Thanks!
Attachment #8676635 -
Flags: feedback?(ferjmoreno)
Updated•9 years ago
|
QA Whiteboard: [COM= Data Sync]
Comment 7•9 years ago
|
||
Comment on attachment 8676635 [details] [review] [gaia] michielbdejong:1216319-clear-command > mozilla-b2g:master Looks good! Thanks for addressing the previous feedback.
Attachment #8676635 -
Flags: feedback?(ferjmoreno) → feedback+
Assignee | ||
Updated•9 years ago
|
Attachment #8676635 -
Flags: review- → review?(ferjmoreno)
Comment 8•9 years ago
|
||
Comment on attachment 8676635 [details] [review] [gaia] michielbdejong:1216319-clear-command > mozilla-b2g:master Thanks! I left a couple of comments more on the PR
Attachment #8676635 -
Flags: review?(ferjmoreno) → review+
Assignee | ||
Comment 9•9 years ago
|
||
Comments addressed and rebased, TreeHerder almost finished (98% atm).
Comment 10•9 years ago
|
||
https://github.com/mozilla-b2g/gaia/commit/927bcd0612d89925ead14a320c65ebd21b5d61e3
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•