Open Eithea opened 2 years ago
Could I try this issue?!
@kjw7953 Thank you for your contribution.
https://codepair.yorkie.dev/9340gq There was a data conflict in the CodePair document that you wrote while organizing this issue. To fix the problem, I would like to ask about the editing situation.
Did you see the text crack in your client view while you were writing the document? Or was the text normal while you were editing?
@Eithea Hi, there was no crack in my view when I was writing. I checked that page again two hours after I wrote it, and there was also no problem.
FYI, when I use the codepair for the first time (7.14), the conflict occurred almost immediately.
@kjw7953 Thank you for your answer.
Considering your answer, the client's local replica editing works normally because of recent bug-fixes. But there seems to be something wrong yet with the process of applying it in the docs of server DB. Your answer was very helpful in finding the cause of the problem. I'll try to fix it quickly.
We can consider the following approach:
For example:
const bigContent = '...';
const contents = bigContent.splitXXX();
const offset = 0;
for (const content of contents) {
document.update((root) => {
root.text.edit(offset, offset, content);
offset += content.length;
});
}
doc.localChanges
.MaxRecvMsgSize
options to Client
. We can set the value of MaxRecvMsgSize
on the server to the client.doc.localChanges
until the size of changes less than the MaxRecvMsgSize
and then sent them when calling client.sync
.If only a part of the change succeeds in sending and the rest fails, there may be a problem that only part of the pasted content remains in the document.
What happened:
I tried to copy and paste 2^20bytes text but the request failed and tried infinitely.
What you expected to happen:
How to reproduce it (as minimally and precisely as possible): edit over 2^20bytes at once.
Anything else we need to know?:
Environment: