BUGFIX: make sure clean the ls if created failed

This commit is contained in:
obdev
2023-12-22 09:14:52 +00:00
committed by ob-robot
parent 22e5fbfb00
commit bfe2b080dd
36 changed files with 547 additions and 477 deletions

View File

@ -248,7 +248,7 @@ void ObMultiVersionSSTableTest::SetUpTestCase()
void ObMultiVersionSSTableTest::TearDownTestCase()
{
ASSERT_EQ(OB_SUCCESS, MTL(ObLSService*)->remove_ls(ObLSID(ls_id_), false));
ASSERT_EQ(OB_SUCCESS, MTL(ObLSService*)->remove_ls(ObLSID(ls_id_)));
ObKVGlobalCache::get_instance().destroy();
//ObIODeviceWrapper::get_instance().destroy();
OB_STORE_CACHE.destroy();

View File

@ -225,7 +225,7 @@ void TestCompactionPolicy::SetUpTestCase()
void TestCompactionPolicy::TearDownTestCase()
{
int ret = OB_SUCCESS;
ret = MTL(ObLSService*)->remove_ls(ObLSID(TEST_LS_ID), false);
ret = MTL(ObLSService*)->remove_ls(ObLSID(TEST_LS_ID));
ASSERT_EQ(OB_SUCCESS, ret);
ObTenantMetaMemMgr *t3m = MTL(ObTenantMetaMemMgr*);
ASSERT_EQ(OB_SUCCESS, ret);

View File

@ -99,7 +99,7 @@ TEST_F(TestTabletMemtableMgr, tablet_memtable_mgr) {
ASSERT_EQ(OB_ENTRY_NOT_EXIST, protected_handle->get_active_memtable(handle));
ASSERT_EQ(0, pool->count_);
ASSERT_EQ(OB_SUCCESS, MTL(ObLSService*)->remove_ls(ls_id, false));
ASSERT_EQ(OB_SUCCESS, MTL(ObLSService*)->remove_ls(ls_id));
}

View File

@ -130,7 +130,7 @@ TEST_F(TestCreateTabletClog, replay_create_tablet_clog_test)
// 4. remove tablet
ASSERT_EQ(OB_SUCCESS, ls_service->delete_tablet(ls_id, tablet_id));
EXPECT_EQ(OB_SUCCESS, ls_service->remove_ls(ls_id, true));
EXPECT_EQ(OB_SUCCESS, ls_service->remove_ls(ls_id));
if (buffer != nullptr) {
ob_free(buffer);