Closed Bug 836790 Opened 7 years ago Closed 6 years ago

Don't GET changes if info/collections says there are none

Categories

(Firefox for Android :: Android Sync, defect, P3)

All
Android
defect

Tracking

()

VERIFIED FIXED
Tracking Status
fennec 29+ ---

People

(Reporter: nalexander, Assigned: nalexander)

References

(Blocks 1 open bug)

Details

(Whiteboard: [qa+])

Attachments

(2 files)

At the moment, Android Sync makes one HTTP request for every collection, even when info/collections says there are no changes to download.  Low hanging fruit!
This is one small piece of Bug 726055.
Blocks: 726055
Product: Mozilla Services → Android Background Services
Priority: -- → P3
Attached file github PR
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Blocks: 969252
tracking-fennec: --- → 29+
QA: we'd like some additional testing for the try build above.

This ticket stops Android Sync downloading collections that the info/collections record says haven't changed since we last synced.  This will reduce our number of HTTP requests significantly, since most Syncs don't fetch new remote data.

However, there's a risk that we could miss things that have changed remotely; or something else really bad happens.  So we'd like additional testing to exercise this change.

1) Install current Nightly on an Android device.
2) Connect Android to an FxAccount that has another device connected to it (so you can do things on the other device and get new records on the Sync server).
3) |adb shell setprop log.tag.FxAccounts DEBUG|
4) Verify that Sync is functioning.  On a forced sync, you should see DEBUG logs saying things like

HTTP GET .../bookmarks?...
HTTP GET .../forms?...

every single sync, regardless if anything has changed on the server.

5) Install the try build above.
6) Verify that Sync is functioning.  On a forced sync, you should see fewer DEBUG logs saying things like HTTP GET .../{collection}?...
You should see logs like "Repository says it has no data available, not fetching."  (Can't recall the wording, and don't have a log to copy it from.)
You will see /clients every Sync (that's intentional).  But you shouldn't see as many HTTP GET logs.
7) Change something (a bookmark, say) on the other device, and make sure that device syncs to the Sync server.
8) Force a sync.  You should see the new bookmark locally, and you should see a DEBUG log saying
HTTP GET .../{bookmarks}?...
Keywords: qawanted
Whiteboard: [qa+]
I didn't want this to bit-rot, so I've landed.  I'm flagging some QA folks for additional exposure.

AaronMT: can you be on the look-out for missing/slow Sync data in the next few days?
Flags: needinfo?(aaron.train)
https://hg.mozilla.org/mozilla-central/rev/ee38720b1ae7
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Flags: needinfo?(aaron.train)
Keywords: qawanted
Attached file logcat.log
Nick, here's a sample device log if you wish to take a look at anything I missed. I haven't seen any issues since this landed.
Comment on attachment 8399999 [details]
logcat.log

This looks healthy.  Some engines show data and sync; some engines show no data available and sync.  Thanks, AaronMT!
Product: Android Background Services → Firefox for Android
You need to log in before you can comment on or make changes to this bug.