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 invalid indexOf SplayTree with single node #463

Merged
merged 1 commit into from
Feb 20, 2023
Merged

Conversation

chacha912
Copy link
Contributor

What this PR does / why we need it?

Fix invalid index of SplayTree with a single node.

This PR addresses an issue with the indexOf in SplayTree, which was failing to calculate the correct index when there was only one node in the tree. The conditional statement has been updated to account for this scenario.

Any background context you want to provide?

What are the relevant tickets?

Address yorkie-team/yorkie#470

Checklist

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

@codecov
Copy link

codecov bot commented Feb 20, 2023

Codecov Report

Merging #463 (3922623) into main (3a34270) will increase coverage by 0.08%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #463      +/-   ##
==========================================
+ Coverage   89.19%   89.28%   +0.08%     
==========================================
  Files          67       67              
  Lines        5247     5253       +6     
  Branches      524      524              
==========================================
+ Hits         4680     4690      +10     
+ Misses        382      381       -1     
+ Partials      185      182       -3     
Impacted Files Coverage Δ
src/util/splay_tree.ts 92.51% <100.00%> (+2.13%) ⬆️
test/unit/util/splay_tree_test.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@hackerwins hackerwins self-requested a review February 20, 2023 03:34
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 merged commit 76a44ea into main Feb 20, 2023
@hackerwins hackerwins deleted the single-node-splay branch February 20, 2023 03:34
hunkim98 pushed a commit to hunkim98/yorkie-js-sdk that referenced this pull request Jul 12, 2023
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.

None yet

2 participants