Open
Bug 1212426
Opened 10 years ago
Updated 3 years ago
Use X-If-Unmodified-Since=0 to make ServerConfigurationRequiredError robust
Categories
(Firefox for iOS :: Sync, defect)
Tracking
()
NEW
| Tracking | Status | |
|---|---|---|
| fxios | + | --- |
People
(Reporter: nalexander, Unassigned, Mentored)
References
Details
Right now, ServerConfigurationRequiredError does two sequential PUTs to upload meta/global and crypto/keys. We can do better: we should use X-I-U-S=0 and add a terminal ClientRaceDetected state when we see 412 status codes back.
Updated•10 years ago
|
tracking-fxios:
--- → 1.1+
Comment 1•10 years ago
|
||
Nick, can you mentor this, perhaps for Steph, James, or Emily?
Flags: needinfo?(nalexander)
| Reporter | ||
Comment 2•10 years ago
|
||
(In reply to Richard Newman [:rnewman] from comment #1)
> Nick, can you mentor this, perhaps for Steph, James, or Emily?
Yes, absolutely. Details on X-If-Unmodified-Since and 412 responses can be found at http://docs.services.mozilla.com/storage/apis-1.5.html#request-headers.
The code change required is including ifUnmodifiedSince: 0 to the two relevant PUTs at https://github.com/mozilla/firefox-ios/blob/c4fb24a4b4345943022db5b115811362e57f2223/Sync/SyncStateMachine.swift#L407 and just below it. (Those two can be simultaneous, BTW.) In success cases, advance as before.
The error case is when you see a 412. Handle that by adding a new terminal state (say ClientRaceDetected) to the SyncStateMachine, like ClientUpgradeRequired. (See https://people.mozilla.org/~nalexander/SyncStateMachine.pdf and https://people.mozilla.org/~nalexander/SyncStateMachine.graffle.) The terminal state should just fail; next sync, we'll try again.
The hardest part of this will be testing, since MockSyncServer doesn't handle X-I-U-S for individual PUT requests. And since it will probably take a custom subclass to arrange for the desired 412 Conflict response.
Mentor: nalexander
Flags: needinfo?(nalexander)
Updated•10 years ago
|
Whiteboard: nicetohave1.1
Updated•10 years ago
|
Updated•10 years ago
|
Whiteboard: nicetohave1.1
Comment 4•10 years ago
|
||
Yes, if Nick can mentor it in the right timeframe.
Flags: needinfo?(rnewman)
Updated•10 years ago
|
Updated•10 years ago
|
Rank: 10
Comment 5•10 years ago
|
||
Does this need to go in 1.3?
Updated•10 years ago
|
Flags: needinfo?(rnewman)
| Reporter | ||
Comment 6•10 years ago
|
||
(In reply to Stefan Arentz [:st3fan] from comment #5)
> Does this need to go in 1.3?
No. Tracking+, whatever that is for iOS.
Flags: needinfo?(rnewman)
Comment 7•10 years ago
|
||
Nick, Richard, what do we need to do with this bug? It keeps popping up in triage.
Flags: needinfo?(rnewman)
Flags: needinfo?(nalexander)
| Reporter | ||
Comment 8•10 years ago
|
||
(In reply to Stefan Arentz [:st3fan] from comment #7)
> Nick, Richard, what do we need to do with this bug? It keeps popping up in
> triage.
This is handling an edge of an edge race condition, and will make this client much more robust than other clients.
Feel free to de-prioritize.
Flags: needinfo?(rnewman)
Flags: needinfo?(nalexander)
Updated•10 years ago
|
Rank: 10 → 5
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•