[CP] adjust tablet pointer reset order to avoid memory access violation

This commit is contained in:
hiddenbomb
2024-02-07 03:55:35 +00:00
committed by ob-robot
parent 6421f310e9
commit c10dd2cdd4
13 changed files with 128 additions and 73 deletions

View File

@ -27,6 +27,18 @@ namespace oceanbase
namespace storage
{
ObIMemtableMgr::~ObIMemtableMgr()
{
int ret = OB_SUCCESS;
const int64_t ref_cnt = get_ref();
if (OB_UNLIKELY(0 != ref_cnt)) {
STORAGE_LOG(ERROR, "ref cnt is NOT 0", K(ret), K(ref_cnt), K_(tablet_id), KPC(this));
}
reset_tables();
ATOMIC_STORE(&ref_cnt_, 0);
}
int ObIMemtableMgr::get_active_memtable(ObTableHandleV2 &handle) const
{
int ret = OB_SUCCESS;