ITADN

`updateTree` with multiple Remove Updates sometimes fail

#228OpenJFen9 创建于 2025-02-25
J
JFen9commented
I implemented a multiple tile removal like this: ``` updateTree( currentNode, getMosaicPaths(currentNode, nodes).map(path => createRemoveUpdate(currentNode, path))) ``` I implemented getMosaicPaths that returns a list of MosaicPath, and created list of RemoveUpdates out of them and passed them into updateTree. Sometimes (not all the times) the updateTree fail because one of the remove updates causes the tree to rebalance, thus the remaining updates cannot proceed because the paths are no longer valid. Perhaps one way to address it is to disallow rebalancing during the updateTree to ensure the paths it takes in continues to be valid, and then rebalance at the end if needed.
0 条评论