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

Reverse TreeChanges when Deleting in Tree #774

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

raararaara
Copy link
Contributor

@raararaara raararaara commented Apr 12, 2024

What this PR does / why we need it?

This PR addresses the issue where, in a tree data structure, when range deletion operations occur and are split into multiple events by makeDeletionChanges, the order of events needs to be reversed. If you don't reverse the order, you may lead to situations where adjustments to the range are necessary for subscribers of the events.
More detailed information on this scenario can be found in issue #773.

Any background context you want to provide?

When range deletion operations result in multiple events due to the makeDeletionChanges() function, in order to prevent issues for subscribers handling these events, the order of events must be reversed. By reversing the order of events, there is no need to adjust the range of the next event by the previous event.

What are the relevant tickets?

Fixes #773

Checklist

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

@hackerwins hackerwins marked this pull request as ready for review April 12, 2024 02:36
@hackerwins hackerwins self-requested a review April 12, 2024 02:36
Copy link
Member

@hackerwins hackerwins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution.

@hackerwins hackerwins changed the title Reverse the Order of Events when Range Deletion Operations are Split in Tree Structure Reverse TreeChanges when Deletion Operations in Tree Apr 12, 2024
@hackerwins hackerwins merged commit 8c0e164 into main Apr 12, 2024
2 checks passed
@hackerwins hackerwins deleted the tree-range-deletion-reverse branch April 12, 2024 02:39
@hackerwins hackerwins changed the title Reverse TreeChanges when Deletion Operations in Tree Reverse TreeChanges when Deleting in Tree Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in treePath for Remote Changes in tree.edit operation for concurrent edit
2 participants