BUGFIX: move safe destroy worker into tenant

This commit is contained in:
obdev
2023-07-17 03:12:14 +00:00
committed by ob-robot
parent cf39d8c8e3
commit a4bb627063
36 changed files with 124 additions and 259 deletions

View File

@ -29,7 +29,6 @@
#include "storage/tx_storage/ob_ls_service.h"
#include "mtlenv/mock_tenant_module_env.h"
#include "storage/test_dml_common.h"
#include "observer/ob_safe_destroy_thread.h"
using namespace oceanbase::common;
using namespace oceanbase::share;
@ -68,8 +67,6 @@ void TestLSMigrationParam::SetUpTestCase()
int ret = OB_SUCCESS;
ret = MockTenantModuleEnv::get_instance().init();
ASSERT_EQ(OB_SUCCESS, ret);
SAFE_DESTROY_INSTANCE.init();
SAFE_DESTROY_INSTANCE.start();
ObServerCheckpointSlogHandler::get_instance().is_started_ = true;
// create ls
@ -84,10 +81,6 @@ void TestLSMigrationParam::TearDownTestCase()
ret = MTL(ObLSService*)->remove_ls(ObLSID(TEST_LS_ID), false);
ASSERT_EQ(OB_SUCCESS, ret);
// tenant need destroy after safe to destroy
SAFE_DESTROY_INSTANCE.stop();
SAFE_DESTROY_INSTANCE.wait();
SAFE_DESTROY_INSTANCE.destroy();
MockTenantModuleEnv::get_instance().destroy();
}