hackerwins / codepair-old

Real-time markdown editor for interviews, meetings and more...
https://codepair.yorkie.dev
Apache License 2.0
90 stars 29 forks source link

Sometimes `Edit` operations apply twice #203

Closed Eithea closed 2 years ago

Eithea commented 2 years ago

What happened: 버그

There is a problem about text breaking, but the exact cause is unknown.

When looking at the shape of the broken text, it can be assumed that the Edit operations are applied twice. (for example from above text, if all edits that write the text -> 메시지 손실이 생기는 방법이 좋은 걸까? are executed twice, then the next text ?ㄲㄱ ㅇㅈ ㅇㅂㅂ 느ㄱㅅ ㅇㅅㅅ 지시ㅁ >- is appears.)

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

This problem does not always occur, but only occasionally occurs in some documents.

Anything else we need to know?:

According to a user who experienced the problem, the local user cannot find this problem, there was no problem while writing the text in local, but the problem were found when accessing it again later.

Overall, a event handler in somewhere may be conditionally duplicated and sending change to the server twice.

Environment:

hackerwins commented 2 years ago

This was fixed by https://github.com/yorkie-team/codepair/commit/43d973a05111c15271f4806ca6e3b4a25b6af0c7.