avoid redundant log and set mem attr for allocator in migrate tablet param
This commit is contained in:
@ -1958,7 +1958,7 @@ int ObLSTabletService::inner_table_scan(
|
||||
const int64_t timeout = param.timeout_ - current_time;
|
||||
if (OB_UNLIKELY(timeout <= 0)) {
|
||||
ret = OB_TIMEOUT;
|
||||
LOG_WARN("table scan timeout", K(ret), K(current_time), "table_scan_param_timeout", param.timeout_);
|
||||
LOG_WARN("table scan timeout", K(ret), K(current_time), "table_scan_param_timeout", param.timeout_, K(lbt()));
|
||||
} else if (OB_FAIL(tablet_handle.get_obj()->check_snapshot_readable_with_cache(snapshot_version, timeout))) {
|
||||
LOG_WARN("failed to check snapshot readable", K(ret), K(snapshot_version), K(timeout));
|
||||
} else if (param.need_switch_param_) {
|
||||
|
@ -193,7 +193,6 @@ inline int ObITabletMdsInterface::get_mds_data_from_tablet<ObTabletCreateDeleteM
|
||||
int64_t pos = 0;
|
||||
if (user_data.empty()) {
|
||||
ret = OB_EMPTY_RESULT;
|
||||
MDS_LOG_GET(WARN, "data on tablet is empty", K(ret), KPC(kv));
|
||||
} else if (CLICK_FAIL(data.deserialize(user_data.ptr(), user_data.length(), pos))) {
|
||||
MDS_LOG_GET(WARN, "failed to deserialize", K(user_data),
|
||||
"user_data_length", user_data.length(),
|
||||
@ -543,7 +542,11 @@ int ObITabletMdsInterface::get_snapshot(OP &&read_op,
|
||||
return read_op(data);
|
||||
};
|
||||
if (CLICK_FAIL(get_mds_data_from_tablet<T>(func))) {
|
||||
MDS_LOG_GET(WARN, "failed to get snapshot data from tablet");
|
||||
if (OB_EMPTY_RESULT == ret) {
|
||||
// read nothing from tablet, maybe this is not an error
|
||||
} else {
|
||||
MDS_LOG_GET(WARN, "failed to get snapshot data from tablet");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -584,7 +587,11 @@ int ObITabletMdsInterface::get_snapshot(const Key &key,
|
||||
return read_op(data);
|
||||
};
|
||||
if (CLICK_FAIL(get_mds_data_from_tablet<Value>(func))) {
|
||||
MDS_LOG_GET(WARN, "failed to get latest data from tablet");
|
||||
if (OB_EMPTY_RESULT == ret) {
|
||||
// read nothing from tablet, maybe this is not an error
|
||||
} else {
|
||||
MDS_LOG_GET(WARN, "failed to get snapshot data from tablet");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3596,6 +3596,9 @@ int ObTablet::build_migration_tablet_param(
|
||||
ret = OB_NOT_INIT;
|
||||
LOG_WARN("not inited", K(ret), K_(is_inited));
|
||||
} else {
|
||||
// allocator
|
||||
mig_tablet_param.allocator_.set_attr(ObMemAttr(MTL_ID(), "MigTabletParam", ObCtxIds::DEFAULT_CTX_ID));
|
||||
|
||||
mig_tablet_param.ls_id_ = tablet_meta_.ls_id_;
|
||||
mig_tablet_param.tablet_id_ = tablet_meta_.tablet_id_;
|
||||
mig_tablet_param.data_tablet_id_ = tablet_meta_.data_tablet_id_;
|
||||
@ -3623,7 +3626,6 @@ int ObTablet::build_migration_tablet_param(
|
||||
mig_tablet_param.transfer_info_ = tablet_meta_.transfer_info_;
|
||||
mig_tablet_param.is_empty_shell_ = is_empty_shell();
|
||||
|
||||
|
||||
ObArenaAllocator arena_allocator("BuildMigParam");
|
||||
const ObStorageSchema *storage_schema = nullptr;
|
||||
const ObTabletAutoincSeq *tablet_autoinc_seq = nullptr;
|
||||
@ -4676,6 +4678,9 @@ int ObTablet::build_transfer_tablet_param(
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
mig_tablet_param.reset();
|
||||
// allocator
|
||||
mig_tablet_param.allocator_.set_attr(ObMemAttr(MTL_ID(), "MigTabletParam", ObCtxIds::DEFAULT_CTX_ID));
|
||||
|
||||
ObTabletCreateDeleteMdsUserData user_data;
|
||||
share::SCN max_data_scn;
|
||||
ObTabletMdsData mds_table_data;
|
||||
@ -4726,6 +4731,7 @@ int ObTablet::build_transfer_tablet_param(
|
||||
mig_tablet_param.ddl_data_format_version_ = tablet_meta_.ddl_data_format_version_;
|
||||
mig_tablet_param.mds_checkpoint_scn_ = user_data.transfer_scn_;
|
||||
mig_tablet_param.report_status_.reset();
|
||||
|
||||
const int64_t transfer_seq = tablet_meta_.transfer_info_.transfer_seq_ + 1;
|
||||
|
||||
if (OB_FAIL(mig_tablet_param.transfer_info_.init(tablet_meta_.ls_id_, user_data.transfer_scn_, transfer_seq))) {
|
||||
|
Reference in New Issue
Block a user