Closed
Bug 1214193
Opened 9 years ago
Closed 9 years ago
Deal with unknown incoming tombstones in history data adapter
Categories
(Firefox OS Graveyard :: Sync, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
FxOS-S10 (30Oct)
People
(Reporter: mbdejong, Assigned: mbdejong)
References
Details
(Whiteboard: [partner-cherry-pick])
Attachments
(1 file)
It seems to me that asyncStorage.getItem in https://github.com/mozilla-b2g/gaia/blob/master/apps/sync/js/adapters/history.js#L64 will return null if a tombstone is imported on initial sync. We should check for that case and not try to delete the record with id null from the DataStore.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → mbdejong
Summary: Deal with unknown incoming tombstones → Deal with unknown incoming tombstones in history data adapter
Comment 2•9 years ago
|
||
The ID got from getItem will be used here to remove a record:
https://github.com/mozilla-b2g/gaia/blob/master/apps/sync/js/adapters/history.js#L156
Agree with you that it should not try to remove a record of 'null' ID.
Flags: needinfo?(selee)
Assignee | ||
Comment 3•9 years ago
|
||
In the bookmarks adapter, a similar bug exists - when an unknown tombstone comes in it does console.warn [1], but still tries to continue. I'll add tests and fixes for both history and bookmarks.
[1] https://github.com/mozilla-b2g/gaia/blob/master/apps/sync/js/adapters/bookmarks.js#L149-L151
Assignee | ||
Updated•9 years ago
|
Target Milestone: --- → FxOS-S9 (16Oct)
Comment 4•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8674109 -
Flags: feedback?(selee)
Assignee | ||
Comment 5•9 years ago
|
||
Needs a unit test, still.
Comment 6•9 years ago
|
||
Comment on attachment 8674109 [details] [review]
[gaia] michielbdejong:1214193-incoming-tombstones > mozilla-b2g:master
Thank you, Michiel!
Attachment #8674109 -
Flags: feedback?(selee) → feedback+
Comment 7•9 years ago
|
||
Hey Michiel, I think I can review this patch if you needed. :)
Updated•9 years ago
|
Blocks: TV_FxAccount
Assignee | ||
Updated•9 years ago
|
Target Milestone: FxOS-S9 (16Oct) → FxOS-S10 (30Oct)
Assignee | ||
Updated•9 years ago
|
Priority: -- → P2
Assignee | ||
Updated•9 years ago
|
Attachment #8674109 -
Flags: review?(selee)
Comment 8•9 years ago
|
||
Comment on attachment 8674109 [details] [review]
[gaia] michielbdejong:1214193-incoming-tombstones > mozilla-b2g:master
Thank you! LGTM :)
Attachment #8674109 -
Flags: review?(selee) → review+
Assignee | ||
Comment 11•9 years ago
|
||
Updated the console warning message to be more precise about what is happening.
Assignee | ||
Comment 12•9 years ago
|
||
Comment on attachment 8674109 [details] [review]
[gaia] michielbdejong:1214193-incoming-tombstones > mozilla-b2g:master
Already got r+ from Sean before (changed console warning message after that).
Attachment #8674109 -
Flags: review?(ferjmoreno)
Comment 13•9 years ago
|
||
Comment on attachment 8674109 [details] [review]
[gaia] michielbdejong:1214193-incoming-tombstones > mozilla-b2g:master
LGTM. There's a failing test though.
Attachment #8674109 -
Flags: review?(ferjmoreno) → review+
Assignee | ||
Comment 14•9 years ago
|
||
Turned out that test was already broken in code, but we weren't seeing it in the test. Fixed and split it into two commits.
Flags: needinfo?(ferjmoreno)
Comment 15•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(ferjmoreno)
Resolution: --- → FIXED
Updated•9 years ago
|
Whiteboard: [partner-cherry-pick]
You need to log in
before you can comment on or make changes to this bug.
Description
•