Open
Bug 1212426
Opened 9 years ago
Updated 2 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•9 years ago
|
tracking-fxios:
--- → 1.1+
Comment 1•9 years ago
|
||
Nick, can you mentor this, perhaps for Steph, James, or Emily?
Flags: needinfo?(nalexander)
Reporter | ||
Comment 2•9 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•9 years ago
|
Whiteboard: nicetohave1.1
Updated•9 years ago
|
Updated•9 years ago
|
Whiteboard: nicetohave1.1
Updated•9 years ago
|
Updated•9 years ago
|
Rank: 10
Comment 5•9 years ago
|
||
Does this need to go in 1.3?
Updated•9 years ago
|
Flags: needinfo?(rnewman)
Reporter | ||
Comment 6•9 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•8 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•8 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•8 years ago
|
Rank: 10 → 5
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•