Closed ppeeou closed 3 years ago
Please resolve the conflicts.
@ppeeou Please explain the algorithm for whether the lock will be valid in optimistic replication.
@hackerwins Thank you for your comment :)
isEditing
is valid only when a user is connected to the network
Network synchronization issues between users are merged the same before and after isEditing
is added.
The reason for adding this condition is to prevent a figure from being deleted by others while a user connected to the network manipulates the figure.
The Worker
stores TimeTicket
in memory to manipulate the shape
between user events (mousedown
, mousemove
...) asynchronous actions.
getElementByID method to use the data manipulated in mousedown in mousemove If there is no data at this time(by garbage collection), a bug has occurred.
The above PR is to prevent the object from being deleted when a worker manipulates a shape with a TimeTicket
.
If we do not want to use this method, if yorkie-js-sdk
provides a method to validate the TimeTicket
in the array proxy, it seems to be possible to solve it this way
This method does not solve the concurrency problem.
If an error occurs after getElementByID
, try to solve it with try-catch
.
I plan to add other PR
What this PR does / why we need it?
the error occurs when another user deletes the shape while the user is working on it.
Add conditions to delete shapes. The conditions to be added are as follows.
isEditing
value must be true.Whenever there is a change in
useEffect
,Container
is created every time, so changed it to a singleton.Any background context you want to provide?
What are the relevant tickets?
Fixes #77
Checklist