-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix miscalculation of tree size in concurrent editing (#891)
This commit addresses the issue where the updateAncestorsSize method subtracts the size of a tombstoned node from its ancestors' sizes when the node is removed. However, the previous logic did not consider cases where ancestors node are tombstoned. In such cases, the update should not propagate to the parent's ancestors. This commit introduces recursive checks on ancestors and stops updating process if a tombstoned ancestor is encountered. Furthermore, the PR ensures consistency between the size maintenance policies of updateDescendantsSize and updateAncestorsSize. --------- Co-authored-by: Youngteac Hong <[email protected]>
- Loading branch information
1 parent
ef70028
commit 12f7baa
Showing
3 changed files
with
148 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters