Closed Bug 1366067 Opened 8 years ago Closed 7 years ago

Use JSONFile.jsm to write Sync metadata files

Categories

(Firefox :: Sync, enhancement, P1)

enhancement

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.
Priority: -- → P3
See Also: → 1405833
Priority: P3 → P2
Assignee: nobody → kit
Status: NEW → ASSIGNED
Depends on: 1368209
Priority: P2 → P1
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 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 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
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: