Skip to content

Draft: De-duplicate the removal logic from cleanup_dead_nodes()

Ondřej Surý requested to merge ondrej/deduplicate-cleanup_dead_node into main

Instead of implementing the removal logic in the cleanup_dead_nodes(), increment and decrement the reference again, and let the decref() handle the deletions. We now hold both write locks, so the item will not be re-added to the deadnodes list.

As added bonus - this removes the possibility of removing and adding a rbt node to the deadnodes again and again when it has a new child since it was added to the deadnodes list.

Merge request reports