Fix race condition during synchronization
Categories
(Firefox :: Remote Settings Client, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: leplatrem, Assigned: leplatrem)
References
Details
Attachments
(2 files)
For the synchronization of a collection, we fetch data from 2 endpoints (metadata + records) with two different requests. This can lead to race conditions if data is modified in the interval.
Using a single endpoint instead of two, and thus having a single request instead of the current «two steps» synchronization, should prevent race conditions from happening.
On the server side, we could expose a new endpoint (eg. /buckets/{bid}/collections/{cid}/changeset
) that would return both metadata and changes in one response.
{
"data": {
"changes": [{
"id": "88687994-5344-11ea-8e6c-472e7b6636b2",
"last_modified": ...
},
…
],
"metadata": {
…
}
}
The changes would be filtered using ?_since=<> as usual.
The latest version will always be returned (latest metadata, latest changes since provided timestamp).
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D71569
Updated•5 years ago
|
Comment 4•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0f24b88f0cbe
https://hg.mozilla.org/mozilla-central/rev/20d2e7042fff
Description
•