Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrent case handling for Yorkie.tree #611

Merged
merged 76 commits into from
Aug 21, 2023
Merged

Conversation

ehuas
Copy link
Contributor

@ehuas ehuas commented Aug 10, 2023

What this PR does / why we need it?

Introduced new logical timestamp for identifying position in local/remote editing, and ensures commutative editing in concurrent cases.

Any background context you want to provide?

This logical timestamp consists of {parentID, leftSiblingID}. This allows editing at the front of text nodes by using a reference to the parent, as well as getting rid of the local offset used to access an element node's children previously by using the leftSiblingID.

What are the relevant tickets?

Address yorkie-team/yorkie#559

Checklist

  • Added relevant tests or not required
  • Didn't break anything

@hackerwins
Copy link
Member

@sejongk Could you sign the CCLA?

@chacha912 chacha912 mentioned this pull request Aug 21, 2023
2 tasks
@hackerwins hackerwins mentioned this pull request Aug 21, 2023
2 tasks
@hackerwins hackerwins merged commit 990a6d6 into main Aug 21, 2023
2 checks passed
@hackerwins hackerwins deleted the concurrent-case-handling branch August 21, 2023 10:15
banma1234 added a commit to banma1234/yorkie-js-sdk that referenced this pull request Aug 21, 2023
Concurrent case handling for Yorkie.tree (yorkie-team#611)
banma1234 added a commit to banma1234/yorkie-js-sdk that referenced this pull request Aug 21, 2023
Concurrent case handling for Yorkie.tree (yorkie-team#611)
@hackerwins hackerwins mentioned this pull request Aug 23, 2023
2 tasks
hackerwins added a commit that referenced this pull request Jan 30, 2024
The root cause of the issue was related to the use of getLastTimeTicket
within posRangeToIndexRange(Ref: #611). To find nodes, the function
findNodesAndSplitText was used, which includes a process to determine
the position when inserting nodes, requiring a TimeTicket as a reference.

However, for posRangeToIndexRange, which involves simple retrieval
without node insertion, this logic was unnecessary.

Consequently, This commit made modifications to exclude this specific logic.

---------

Co-authored-by: Youngteac Hong <susukang98@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol changed 📝 Whether the protocol has changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants