Closed Bug 1204830 Opened 9 years ago Closed 9 years ago

Check meta/global engines in Sync app

Categories

(Firefox OS Graveyard :: Sync, defect, P3)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED FIXED
FxOS-S11 (13Nov)

People

(Reporter: mbdejong, Assigned: mbdejong)

References

Details

Attachments

(1 file)

"The client needs to validate the meta/global record on every request." https://docs.services.mozilla.com/sync/lifeofasync.html

But:
[info/collections] is a utility API provided by the storage service that reveals which collections exist on the server and when they were last modified.

That means we can save work, as follows:
* Retrieve info/collections.
* If none of the data collections we need have have changed according to info/collections, stop here.
* Retrieve meta/global and check storage format.
* Only retrieve crypto/keys if it has changed according to info/collections.
* Only retrieve data collections that have changed according to info/collections.
Assignee: nobody → mbdejong
Blocks: 1195647
Target Milestone: --- → FxOS-S11 (13Nov)
Priority: -- → P3
Looks like info/collections was moved to meta/global.engines
Summary: Fetch info/collections in Sync app → Check meta/global engines in Sync app
Comment on attachment 8686123 [details] [review]
[gaia] michielbdejong:1204830-check-metaglobal-engines > mozilla-b2g:master

See http://docs.services.mozilla.com/sync/storageformat5.html#metaglobal-record
Attachment #8686123 - Flags: review?(ferjmoreno)
(In reply to Michiel de Jong [:michielbdejong] from comment #1)
> Looks like info/collections was moved to meta/global.engines

Created https://github.com/mozilla-services/docs/issues/55 about the docs issue.
Attachment #8686123 - Flags: review?(ferjmoreno) → review+
Turns out Syncto doesn't support retrieving info/collections. I'm not so sure anymore now whether we really need this.
If we check meta/globals for the engines like in this patch, then I think it's not so important to also check info/collections (would only be a performance optimization when syncing many collections, and for now we're only syncing one or two).
What do you think, shall we just merge this to check the engines from m/g, and then leave it at that?
Flags: needinfo?(ferjmoreno)
Sounds good to me.
Flags: needinfo?(ferjmoreno)
https://github.com/mozilla-b2g/gaia/commit/1e9a2a701dec486dd94bdb925019bb6ead8291ca
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.

Attachment

General

Created:
Updated:
Size: