mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
btree: Destroy, not drop, node on clone roll-back
The node in this place is not yet attached to its parent, so
in btree::debug::yes (tests only) mode the node::drop()'s parent
checks will access null parent pointer.
However, in non-tesing runtime there's a chance that a linear
node fails to clone one of its keys and gets here. In this case
it will carry both leftmost and rightmost flags and the assertion
in drop will fire.
Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
(cherry picked from commit 1d857d604a)
Ref #9248.
This commit is contained in:
committed by
Avi Kivity
parent
edead1caf9
commit
02da29fd05
@@ -2082,7 +2082,7 @@ private:
|
||||
n->_kids[ni - 1]->clear([&deleter] (member_hook* h) { node::dispose_key(h, deleter); });
|
||||
destroy(*n->_kids[--ni]);
|
||||
}
|
||||
n->drop();
|
||||
destroy(*n);
|
||||
throw;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user