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
When c2.sync() is called, it sends two pushpull requests with checkpoint{clientSeq: 1, serverSeq: 3}. The server responds with change (serverSeq 4), then c2 applies the same change twice, resulting in [1, 2, 3, 3] not [1, 2, 3].
(When multiple changes are pushed, the server handles it to prevent duplicate changes from being stored. However, the client needs to handle it when processing the response.)
I think one of the solution is enqueuing 'sync' requests. The next request should be sent after receiving the response to update the server sequence.
Environment:
Operating system:
Browser and version:
Yorkie version (use yorkie version): 0.4.5
Yorkie JS SDK version: 0.4.5
The text was updated successfully, but these errors were encountered:
What happened:
When performing multiple 'pushpull' requests, the SDK doesn't work correctly. For example, the following test case fails:
yorkie-js-sdk/test/integration/document_test.ts
Lines 57 to 93 in 394c061
Anything else we need to know?:
In the test code, four changes are generated:
root['k1'] = [1, 2]
root['k1'].push(3)
When
c2.sync()
is called, it sends twopushpull
requests withcheckpoint{clientSeq: 1, serverSeq: 3}
. The server responds withchange (serverSeq 4)
, then c2 applies the same change twice, resulting in[1, 2, 3, 3]
not[1, 2, 3]
.(When multiple changes are pushed, the server handles it to prevent duplicate changes from being stored. However, the client needs to handle it when processing the response.)
I think one of the solution is enqueuing 'sync' requests. The next request should be sent after receiving the response to update the server sequence.
Environment:
yorkie version
):0.4.5
0.4.5
The text was updated successfully, but these errors were encountered: