Revert shrink memory usage of ddl kv mgr

This commit is contained in:
Hongqin-Li
2023-03-08 15:15:59 +00:00
committed by ob-robot
parent a0edc1b86f
commit a8fb238d49
7 changed files with 19 additions and 73 deletions

View File

@ -170,39 +170,6 @@ int ObTabletDDLKvMgr::ddl_start(ObTablet &tablet,
return ret;
}
int ObTabletDDLKvMgr::ddl_recover_nolock(const ObITable::TableKey &table_key,
const SCN &start_scn,
const int64_t data_format_version,
const int64_t execution_id,
const SCN &commit_scn)
{
int ret = OB_SUCCESS;
if (OB_UNLIKELY(!is_inited_)) {
ret = OB_NOT_INIT;
LOG_WARN("not init", K(ret), K(is_inited_));
} else if (OB_UNLIKELY(!table_key.is_valid() || !start_scn.is_valid_and_not_min() || execution_id < 0 || data_format_version < 0
|| (commit_scn.is_valid_and_not_min() && commit_scn < start_scn))) {
ret = OB_INVALID_ARGUMENT;
LOG_WARN("invalid argument", K(ret), K(table_key), K(start_scn), K(execution_id), K(data_format_version), K(commit_scn));
} else if (table_key.get_tablet_id() != tablet_id_) {
ret = OB_ERR_SYS;
LOG_WARN("tablet id not same", K(ret), K(table_key), K(tablet_id_));
} else if (start_scn_.is_valid_and_not_min()) {
ret = OB_ERR_SYS;
LOG_WARN("start scn has set", K(ret), K(start_scn_));
} else {
table_key_ = table_key;
data_format_version_ = data_format_version;
execution_id_ = execution_id;
start_scn_ = start_scn;
max_freeze_scn_ = commit_scn;
commit_scn_ = commit_scn;
success_start_scn_ = start_scn;
}
FLOG_INFO("ddl recover finished", K(ret), K(*this));
return ret;
}
int ObTabletDDLKvMgr::ddl_commit(const SCN &start_scn,
const SCN &commit_scn,
const uint64_t table_id,
@ -352,12 +319,6 @@ int ObTabletDDLKvMgr::wait_ddl_merge_success(const SCN &start_scn, const SCN &co
"wait_elpased_s", (ObTimeUtility::fast_current_time() - wait_start_ts) / 1000000L);
}
}
if (OB_TASK_EXPIRED == ret) { // maybe ddl merge task has finished
if (is_commit_success()) {
ret = OB_SUCCESS;
FLOG_INFO("ddl commit already succeed", K(start_scn), K(commit_scn), K(*this));
}
}
}
return ret;
}