Improve `syncIfEmpty` documentation
Categories
(Firefox :: Remote Settings Client, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: leplatrem, Assigned: leplatrem)
Details
Attachments
(1 file)
ehsan> any chance you could please weigh in on https://phabricator.services.mozilla.com/D46029?
we think this is probably incorrect docs, but we'd like you to confirm
leplatrem> Indeed, if you pass syncIfEmpty: false we don't even bother checking the local DB. AFAIK in your use-case, since you deliver a local JSON dump, you can leave syncIfEmpty: true (default) and it will load data from resource:// if local DB is empty
ehsan> so this documentation is wrong then, correct? https://searchfox.org/mozilla-central/source/services/common/docs/RemoteSettings.rst#43
(it makes it sound like local data would be returned with syncIfEmpty: false)
leplatrem> hmm, the and if no initial data was provided refers to the JSON dump I admit that a lot of cases are summarized in one long sentence, which is unclear we should add a clarification for the case when a JSON dump (aka initial data) is provided
syncIfEmpty
: implicit synchronization if local data is empty (default: true
).
this read to me and at least one other person as:
if no data present and syncIfEmpty is true, sync from network
otherwise return whatever local data we have, if any
whereas the code behaves as:
if syncIfEmpty is true, sync from network if no data is present
return whatever data we have, if any
it was only through reading the code that we understood the second behaviour, and even then we still couldn't understand the documentation as describing it as such
Comment 1•5 years ago
|
||
The priority flag is not set for this bug.
:leplatrem, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Pushed by mleplatre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e2a6fb626b30 Improve syncIfEmpty documentation and the synchronization process r=Standard8 DONTBUILD
Comment 4•3 years ago
|
||
bugherder |
Description
•