refine tablet init functions & refactor code struct
This commit is contained in:
@ -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));
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user