-
Notifications
You must be signed in to change notification settings - Fork 267
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: Add Extra Check for Reformatted Root Node in GetNode (backport #1007) #1009
Conversation
(cherry picked from commit cf74234) # Conflicts: # mutable_tree_test.go
Cherry-pick of cf74234 has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Problem Description
When the root node is reformatted due to pruning, its nodeKey changes from (version, 1) to (version, 0). As a result:
Proposed Solution
Add an extra check in the GetNode function to handle reformatted root nodes. This ensures that:
Summary by CodeRabbit
New Features
MutableTree
after version deletions.DeleteVersionsFrom(int64)
andGetLatestVersion
.Bug Fixes
GetNode
method to improve retrieval logic for nodes, ensuring better handling of cases withnil
buffers and legacy nodes.Documentation
This is an automatic backport of pull request #1007 done by [Mergify](https://mergify.com).