Add option to force a sync in .get()
Categories
(Firefox :: Remote Settings Client, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: leplatrem, Assigned: leplatrem, NeedInfo)
References
Details
Attachments
(1 file)
Currently, if a consumer needs RS data to be available during the startup phase, we pull the data from the server on new profiles (.get()
has syncIfEmpty
option set to true by default). However, on existing profiles, we return the content of the local DB.
Synchronization will eventually happen:
- when the
hello
response is received from the Push server - when the 24H timer kicks in
Certain consumers will want to always obtain the freshest data on startup (eg. experimentation).
This is what was addressed in Bug 1793890, which basically consisted in doing:
try {
await client.sync();
} catch (e) {}
data = await client.get();
Instead of letting this pattern spread, where each consumer initiates sync organically, I would like to propose to add new option in the .get()
method (eg. forceSync
), so that we make sure all consumers in this situation behave consistently.
Assignee | ||
Comment 1•1 year ago
|
||
Depends on D157433
Updated•1 year ago
|
Comment 2•11 months ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:leplatrem, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.
Pushed by mleplatre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9423b4fe5837 Add option to force a sync in .get() r=nalexander
Comment 4•11 months ago
|
||
bugherder |
Description
•