Closed
Bug 1366067
Opened 8 years ago
Closed 7 years ago
Use JSONFile.jsm to write Sync metadata files
Categories
(Firefox :: Sync, enhancement, P1)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
Firefox 58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: lina, Assigned: lina)
References
Details
Attachments
(1 file)
We currently use JSONFile for the trackers, and we also persist outgoing commands, IDs to fetch, failed IDs, and add-ons reconciler state to disk. These don't register shutdown blockers, and `toFetch` and `failed` operate on a timer.
It's possible to lose data on shutdown, which might be OK for these cases, but let's make sure. If we want more durable storage, let's switch to JSONFile.jsm.
Updated•8 years ago
|
Priority: -- → P3
Assignee | ||
Updated•7 years ago
|
Priority: P3 → P2
Updated•7 years ago
|
Assignee: nobody → kit
Assignee | ||
Updated•7 years ago
|
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•7 years ago
|
||
I didn't convert the clients engine or add-ons reconciler to use `JSONFile` here. That's good fodder for a follow-up, or we can leave them be. The clients engine might benefit from a shutdown blocker.
Comment hidden (mozreview-request) |
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8924818 [details]
Bug 1366067 - Use `JSONFile.jsm` to persist the backlog and previously failed IDs.
https://reviewboard.mozilla.org/r/196050/#review201564
I'm not completely familiar with the JSONFile API, but this looks good to me!
::: services/sync/modules/engines.js:100
(Diff revision 1)
> _dataPostProcessor(json) {
> return typeof json == "object" && json || {};
> },
>
> // Ensure the Weave storage directory exists before writing the file.
> _beforeSave() {
Do we still need this function?
Attachment #8924818 -
Flags: review?(tchiovoloni) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 6•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8924818 [details]
Bug 1366067 - Use `JSONFile.jsm` to persist the backlog and previously failed IDs.
https://reviewboard.mozilla.org/r/196050/#review201564
> Do we still need this function?
I think we do; `test_engine` tests the tracker separately, and we create `weave/changes/` separately from `weave/toFetch/` and `weave/failed`.
Pushed by kcambridge@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/66a726c06aa7
Use `JSONFile.jsm` to persist the backlog and previously failed IDs. r=tcsc
![]() |
||
Comment 8•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
You need to log in
before you can comment on or make changes to this bug.
Description
•