mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 13:45:27 +00:00
283d1a3450
BatchingDownloader uses provided RepositoryStateProvider instance in order to track offset and high water mark as it performs batching. The state holder objects are initialized by individual ServerSyncStages, and prefixes are used to ensure keys won't clash. Two RepositoryStateProvider implementations are used: persistent and non-persistent. Non-persistent state provider does not allow for resuming after a sync restart, while persistent one does. Persistent state provider is used by the history stage. It is fetched oldest-first, and records are applied to live storage as they're downloaded. These conditions let use resume downloads. It's also possible to resume downloads for stages which use a persistent buffer, but currently we do not have any. Offset value and its context is reset if we hit a 412 error; it is maintained if we hit a sync deadline, allowing us to minimize number of records we'll redownload. BatchingDownloaderController owns resuming and context checking logic. High water mark (h.w.m.) is maintained across syncs and used instead of stage's "last-synced" timestamp if said stage is set to fetch oldest-first and explicitely allows use of a h.w.m. Server15RepositorySession provides correct timestamp to RecordsChannel, decoupling BatchingDownloader from this logic. MozReview-Commit-ID: IH28YrDU4vW --HG-- extra : rebase_source : 63bd7daaa1fd2a63e10289d6d4cd198aaf81498b |
||
---|---|---|
.. | ||
aidl/org/mozilla/gecko/media | ||
crashreporter/res | ||
java/org/mozilla/gecko | ||
locales | ||
resources | ||
adjust-sdk-sandbox.token | ||
AdjustConstants.java.in | ||
android-services.mozbuild | ||
AndroidManifest.xml.in | ||
AppConstants.java.in | ||
FennecManifest_permissions.xml.in | ||
GcmAndroidManifest_permissions.xml.in | ||
GcmAndroidManifest_services.xml.in | ||
geckoview.ddf | ||
generate_build_config.py | ||
Makefile.in | ||
moz.build | ||
package-name.txt.in | ||
strings.xml.in |