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

Prevent remote-change events from occurring in push-only mode #759

Merged
merged 5 commits into from
Mar 7, 2024

Conversation

chacha912
Copy link
Contributor

What this PR does / why we need it?

Remote change events should not occur in PushOnly mode.

Any background context you want to provide?

What are the relevant tickets?

Fixes #758

Checklist

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

raararaara and others added 3 commits February 26, 2024 14:42
When performing `CRDTTree.edit()`, the edits are reflected by deepcopying the CRDTTreeNodes for the given range.
This commit adds information about `insPrevID` and `insNextID` during the `deepcopy()` process to ensure that the correct location is returned from the correct path.

---------

Co-authored-by: Yourim Cha <yourim.cha@navercorp.com>
@chacha912 chacha912 self-assigned this Feb 28, 2024
Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.72%. Comparing base (0fc7f74) to head (301eb00).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #759      +/-   ##
==========================================
+ Coverage   81.67%   81.72%   +0.05%     
==========================================
  Files          59       59              
  Lines        4350     4351       +1     
  Branches      853      854       +1     
==========================================
+ Hits         3553     3556       +3     
+ Misses        539      538       -1     
+ Partials      258      257       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.
I left some simple comments.

test/integration/client_test.ts Show resolved Hide resolved
test/integration/tree_test.ts Outdated Show resolved Hide resolved
src/document/crdt/tree.ts Outdated Show resolved Hide resolved
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.

LGTM.

@hackerwins hackerwins changed the title Fix to prevent remote-change events from occurring in push-only mode Prevent remote-change events from occurring in push-only mode Mar 7, 2024
@hackerwins hackerwins merged commit f1627ef into main Mar 7, 2024
2 checks passed
@hackerwins hackerwins deleted the fix/push-pull branch March 7, 2024 10:28
@chacha912 chacha912 added this to the v0.4.15 milestone Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Remote-change event occurs in PushOnly mode
3 participants