You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background
This is easily triggered with a single device, in OSX (iOS is affected as well).
Session 1
Pending ACK for Change 1: 'First'.
Pending Processing Change 2 (same object as above): 'Second'.
Kill the app.
Session 2
As soon as the lib reconnects, Change 1 gets re-posted.
Change 1 is received, in response to '0:cv:xxx' message, and processed.
Change 2 is processed, and posted.
Error 409 is received, in response to the duplicate change in step 1. That causes the local change pending to get nuked.
Bug:
When the ACK for Change 2 is received (Step 3), there is no local pending, because of the way Error 409 is being handled.
This causes the change to be treated as a new diff, instead of an acknowledgements, leading to data corruption.
Why?:
Session 2, step 1, isn't the case anymore. The lib will now retrieve the latest changes first, and then post any local pendings. This will cause, in turn, not to trigger any 409's during the startup sequence.
For the record, the expected startup flows are:
1. [Recv] 1:auth:jorge@lantean.co
2. [Send] 1:cv:53443dc0ba5fdc113d341acc
3. [Recv] 1:cv:[] <- empty changes, we are in sync
4. [Send] Pendings
5. normal
1. [Recv] 1:auth:jorge@lantean.co
2. [Send] 1:cv:53443dc0ba5fdc113d341acc
3. [Recv] 1:cv:[ { }, { }, { } ] <- some changes, process them, may get rid of some changes in pending
4. [Send] Pendings that remain
5. normal
Background
This is easily triggered with a single device, in OSX (iOS is affected as well).
Session 1
Session 2
Bug:
When the ACK for Change 2 is received (Step 3), there is no local pending, because of the way Error 409 is being handled.
This causes the change to be treated as a new diff, instead of an acknowledgements, leading to data corruption.
Logs Available Here
The text was updated successfully, but these errors were encountered: