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

Fix getGarbageLen to retrun correct size #743

Merged
merged 7 commits into from
Jan 4, 2024
Merged

Conversation

devleejb
Copy link
Member

@devleejb devleejb commented Jan 4, 2024

What this PR does / why we need it:

  • To ensure that the GarbageLen function returns the correct length, I used a Map to eliminate duplicate counting
  • Add test case for GarbageLen (same with the test case in this PR)

Which issue(s) this PR fixes:

Fixes #688

Special notes for your reviewer:

Refer yorkie-js-sdk/PR #714
The PR solves the same problem. And you can track the optimization history.

Does this PR introduce a user-facing change?:

NONE

Additional documentation:


Checklist:

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

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0cb7cec) 49.25% compared to head (0b12f63) 49.27%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #743      +/-   ##
==========================================
+ Coverage   49.25%   49.27%   +0.01%     
==========================================
  Files          69       69              
  Lines       10084    10087       +3     
==========================================
+ Hits         4967     4970       +3     
  Misses       4601     4601              
  Partials      516      516              

☔ 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 a comment.

pkg/document/crdt/root.go 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 merged commit 8987b45 into yorkie-team:main Jan 4, 2024
3 checks passed
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.

getGarbageLen() does not match the actual number of elements for garbage collection
2 participants