Closed
Bug 1215470
Opened 9 years ago
Closed 9 years ago
Decide how to deal with update errors in DataAdapters
Categories
(Firefox OS Graveyard :: Sync, defect, P1)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1214189
FxOS-S10 (30Oct)
People
(Reporter: mbdejong, Assigned: mbdejong)
References
Details
When an error occurs during DataAdapter#update, we should try to decide between two evils: giving up on the erroring record as we're doing now [1] (leading to inconsistent data), or throwing an error, meaning the update will be retried on next sync run (possible leading to always trying to repeat the failing update).
[1] https://github.com/mozilla-b2g/gaia/blob/4d1ff2b17850c3ec3d9c6869b73e9a45e4338db4/apps/sync/js/adapters/bookmarks.js#L130
Assignee | ||
Updated•9 years ago
|
Target Milestone: --- → FxOS-S10 (30Oct)
Assignee | ||
Updated•9 years ago
|
Priority: -- → P1
Assignee | ||
Comment 1•9 years ago
|
||
If the error is due to a DataStore race condition or a QuotaExceeded/DiskIO error, we should reject the whole sync run. In all other cases, we probably want to just skip the record that failed.
Assignee | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 3•9 years ago
|
||
Sorry, only the 'decide' part of it was fixed :)
Skipping the record if something weird happens for one specific record is done in https://github.com/mozilla-b2g/gaia/blob/b2991b4c68d2f5339443ebe85dafa5946240bbc1/apps/sync/js/adapters/history.js#L164 and https://github.com/mozilla-b2g/gaia/blob/b2991b4c68d2f5339443ebe85dafa5946240bbc1/apps/sync/js/adapters/bookmarks.js#L144.
Rejecting the sync run in other cases is handled in https://github.com/mozilla-b2g/gaia/blob/b2991b4c68d2f5339443ebe85dafa5946240bbc1/apps/sync/js/adapters/history.js#L402 and https://github.com/mozilla-b2g/gaia/blob/b2991b4c68d2f5339443ebe85dafa5946240bbc1/apps/sync/js/adapters/bookmarks.js#L447.
Rejecting the sync run on DataStore race conditions will be handled as part of bug 1214189.
Flags: needinfo?(mbdejong)
Resolution: FIXED → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•