refine tablet init functions & refactor code struct

This commit is contained in:
hiddenbomb
2023-08-31 12:10:35 +00:00
committed by ob-robot
parent b7da983c8d
commit 6e1811678e
16 changed files with 272 additions and 161 deletions

View File

@ -402,7 +402,7 @@ int TestCompactionPolicy::mock_tablet(
} else if (OB_FAIL(ObTabletCreateDeleteHelper::create_tmp_tablet(key, allocator, tablet_handle))) {
LOG_WARN("failed to acquire tablet", K(ret), K(key));
} else if (FALSE_IT(tablet = tablet_handle.get_obj())) {
} else if (OB_FAIL(tablet->init(allocator, ls_id, tablet_id, tablet_id,
} else if (OB_FAIL(tablet->init_for_first_time_creation(allocator, ls_id, tablet_id, tablet_id,
SCN::min_scn(), snapshot_version, table_schema, compat_mode, table_store_flag, nullptr, ls_handle.get_ls()->get_freezer()))) {
LOG_WARN("failed to init tablet", K(ret), K(ls_id), K(tablet_id), K(snapshot_version),
K(table_schema), K(compat_mode));

View File

@ -132,11 +132,11 @@ inline int TestTabletHelper::create_tablet(
const ObTabletMapKey key(ls_id, tablet_id);
if (OB_FAIL(t3m->create_msd_tablet(WashTabletPriority::WTP_HIGH, key, ls_handle, tablet_handle))) {
STORAGE_LOG(WARN, "t3m acquire tablet failed", K(ret), K(ls_id), K(tablet_id));
} else if (OB_FAIL(tablet_handle.get_obj()->init(
} else if (OB_FAIL(tablet_handle.get_obj()->init_for_first_time_creation(
*tablet_handle.get_allocator(),
ls_id, tablet_id, tablet_id, share::SCN::base_scn(),
snapshot_version, table_schema, compat_mode, store_flag, sstable, freezer))){
STORAGE_LOG(WARN, "tablet init failed", K(ret), K(ls_id), K(tablet_id));
STORAGE_LOG(WARN, "failed to init tablet", K(ret), K(ls_id), K(tablet_id));
} else if (ObTabletStatus::Status::MAX != tablet_status) {
ObTabletCreateDeleteMdsUserData data;
data.tablet_status_ = tablet_status;