提交 66d983f9 编写于 作者: L leftgeek 提交者: ob-robot

fix the bug of deleting tablet from active_ddl_kv_mgr when ddl_checkpoint_scn >= ddl_commit_scn

上级 5643b8be
......@@ -515,7 +515,6 @@ int ObDDLMergeTaskUtils::update_tablet_table_store(ObDDLTabletMergeDagParamV2 &d
table_store_param.ddl_info_.update_with_major_flag_ = for_major;
table_store_param.ddl_info_.keep_old_ddl_sstable_ = !for_major;
table_store_param.ddl_info_.data_format_version_ = dag_merge_param.ddl_task_param_.tenant_data_version_;
table_store_param.ddl_info_.ddl_commit_scn_ = dag_merge_param.rec_scn_;
table_store_param.ddl_info_.ddl_checkpoint_scn_ = dag_merge_param.rec_scn_;
if (!for_major) {
// data is not complete, now update ddl table store only for reducing count of ddl dump sstable.
......
......@@ -1106,10 +1106,7 @@ int ObIncMajorDDLMergeHelper::update_tablet_table_store(
}
if (OB_SUCC(ret)) {
table_store_param.ddl_info_.update_with_major_flag_ = false;
table_store_param.ddl_info_.keep_old_ddl_sstable_ = !for_major;
table_store_param.ddl_info_.data_format_version_ = dag_merge_param.ddl_task_param_.tenant_data_version_;
table_store_param.ddl_info_.ddl_commit_scn_ = dag_merge_param.rec_scn_;
table_store_param.ddl_info_.ddl_checkpoint_scn_ = dag_merge_param.rec_scn_;
for (int64_t i = 0; !for_major && OB_SUCC(ret) && i < co_sstable_array.get_count(); i++ ) {
......@@ -2086,10 +2083,7 @@ int ObSSIncMajorDDLMergeHelper::update_tablet_table_store(
false /* has truncate info*/)))) {
LOG_WARN("init with compaction info failed", K(ret));
} else {
table_store_param.ddl_info_.update_with_major_flag_ = false;
table_store_param.ddl_info_.keep_old_ddl_sstable_ = !dag_merge_param.table_key_.is_inc_major_type_sstable();
table_store_param.ddl_info_.data_format_version_ = dag_merge_param.ddl_task_param_.tenant_data_version_;
table_store_param.ddl_info_.ddl_commit_scn_ = dag_merge_param.rec_scn_;
table_store_param.ddl_info_.ddl_checkpoint_scn_ = dag_merge_param.rec_scn_;
for (int64_t i = 0; !for_major && OB_SUCC(ret) && i < table_array.get_count(); i++ ) {
......
......@@ -76,7 +76,10 @@ int ObActiveDDLKVMgr::del_tablets(const common::ObIArray<ObTabletID> &tablet_ids
if (OB_FAIL(active_ddl_tablets_.assign(tmp_active_tablet_ids))) {
LOG_WARN("assign active ddl tablet ids failed", K(ret));
} else {
FLOG_INFO("del tablets from active ddl kv mgr", K_(active_ddl_tablets), K(tablet_ids));
FLOG_INFO("del tablets from active ddl kv mgr", K_(active_ddl_tablets));
if (!tablet_ids.empty()) {
FLOG_INFO("succeed to del tablets", K(tablet_ids), K(common::lbt()));
}
}
}
}
......@@ -136,11 +139,6 @@ int ObActiveDDLKVIterator::get_next_ddl_kv_mgr(ObDDLKvMgrHandle &handle)
} else {
LOG_WARN("failed to get tablet", K(ret), K(ls_->get_ls_id()), K(tablet_id));
}
} else if (tablet_handle.get_obj()->get_tablet_meta().ddl_commit_scn_.is_valid_and_not_min() &&
tablet_handle.get_obj()->get_tablet_meta().ddl_checkpoint_scn_ >= tablet_handle.get_obj()->get_tablet_meta().ddl_commit_scn_) {
if (OB_FAIL(to_del_tablets_.push_back(tablet_id))) {
LOG_WARN("push back to deleted tablet failed", K(ret));
}
} else if (OB_FAIL(tablet_handle.get_obj()->get_ddl_kv_mgr(handle))) {
LOG_WARN("get ddl kv mgr failed", K(ret));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册