yorkie icon indicating copy to clipboard operation
yorkie copied to clipboard

Converge concurrency cases related to Array.Set

Open hackerwins opened this issue 5 months ago • 1 comments

What would you like to be added:

Converge concurrency cases related to Array.Set(the below 3 failure cases):

In PR #985, we added tests for several cases that can arise during concurrent editing of arrays and introduced the Array.Set method alongside existing operations like Insert, Move, and Remove. To meet the concurrent editing requirements linked to Array.Move, we recognize the need for foundational infrastructure changes(https://github.com/yorkie-team/yorkie/issues/987).

Insert(Prev) Insert(Prev.Next) Set(Target) Remove(Target)
Insert(Prev) o o o o
Insert(Prev.Next) o o o
Set(Target) o o o
Remove(Target) o o o

However, for the concurrency scenarios associated with Array.Set, it appears we can resolve the issues by separating the updates of UpdatedAt and MovedAt, making this a relatively straightforward task.

Why is this needed:

This enhancement will provide clarity and consistency in the usage of the Array.Set method.

hackerwins avatar Sep 03 '24 04:09 hackerwins