Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work towards fixing strong exception safety for node growing/shrinking
Previously, the old node, which was about to be replaced with a larger one, was put into a reclaimable pointer too early, before the new node was allocated successfully. Thus, if that allocation fails, the old node was still reclaimed even if it remained a part of the tree. Fix by moving the responsibility of reclaiming such old nodes from the add/remove tree algorithm implementation to the new node constructors. For that, make them accept lvalue references to the old nodes instead of reclaimable unique pointers. For the constructors to be able to reclaim, move make_db_inode_reclaimable_ptr from olc_art.cpp to basic_art_policy in art_internal_impl.hpp. Cleanup some unused declarations. Add a test case.
- Loading branch information