Skip to content

updateTree with multiple Remove Updates sometimes fail #228

@JFen9

Description

@JFen9

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 continue to be valid, and then rebalance at the end if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions