mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 21:55:31 +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 |
||
---|---|---|
.. | ||
app | ||
base | ||
bouncer | ||
branding | ||
build/classycle | ||
chrome | ||
components | ||
config | ||
docs | ||
extensions | ||
fonts | ||
geckoview | ||
geckoview_example | ||
gradle | ||
installer | ||
javaaddons | ||
locales | ||
modules | ||
search | ||
services | ||
stumbler | ||
tests | ||
themes/core | ||
thirdparty | ||
.eslintrc | ||
app.mozbuild | ||
build.mk | ||
confvars.sh | ||
debug_sign_tool.py | ||
gradle.configure | ||
LICENSE | ||
mach_commands.py | ||
Makefile.in | ||
moz.build | ||
moz.configure |