Closed raararaara closed 1 month ago
The recent changes enhance the functionality of tree structures in the codebase. Key updates include adding new methods for calculating the size of tree nodes and descendants, as well as a new test case for encoding and decoding tree structures. These updates improve the manipulation, encoding, and decoding processes of tree structures, ensuring more accurate and efficient operations.
Files | Change Summary |
---|---|
api/converter/converter_test.go |
Added a test case to the TestConverter function to verify encoding and decoding of tree structures. |
api/converter/from_pb.go |
Added a call to UpdateDescendantsSize on the Index field of root in the FromTreeNodes function. |
pkg/document/crdt/tree.go |
Introduced a new method NodeLen() to the Tree struct to return the size of the LLRBTree. |
pkg/index/tree.go |
Added methods UpdateDescendantsSize and Prepend to the Node struct, and updated UpdateAncestorsSize with a new comment. |
pkg/llrb/llrb.go |
Added a new method Len() to the Tree struct to return the length of the tree. |
Diagrams not generated as the changes are focused on enhancing existing functionalities and adding new methods without altering the core control flow significantly.
In the forest of code, trees now grow, With nodes and sizes, they ebb and flow. Encoding, decoding, a new test in place, Ensuring our structures keep up the pace. With branches that count and roots that know, Our digital forest continues to glow. 🌲✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 11.11111%
with 16 lines
in your changes are missing coverage. Please review.
Project coverage is 50.57%. Comparing base (
6367d90
) to head (316d07d
).
Files | Patch % | Lines |
---|---|---|
pkg/index/tree.go | 0.00% | 12 Missing :warning: |
pkg/document/crdt/tree.go | 0.00% | 2 Missing :warning: |
pkg/llrb/llrb.go | 0.00% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
What this PR does / why we need it:
Fix incorrect tree snapshot encoding/decoding
Which issue(s) this PR fixes:
Address https://github.com/yorkie-team/yorkie-js-sdk/pull/836
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation:
Checklist:
Summary by CodeRabbit
New Features
Tests