fix tx minor merge 4002 problem
This commit is contained in:
@ -212,7 +212,7 @@ int ObStaticMergeParam::get_basic_info_from_result(
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObStaticMergeParam::cal_minor_merge_param()
|
||||
int ObStaticMergeParam::cal_minor_merge_param(const bool has_compaction_filter)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
//some input param check
|
||||
@ -221,8 +221,9 @@ int ObStaticMergeParam::cal_minor_merge_param()
|
||||
LOG_WARN("tables handle is invalid", K(ret), K(tables_handle_));
|
||||
} else {
|
||||
read_base_version_ = 0;
|
||||
if (get_tablet_id().is_ls_inner_tablet() && !is_mini_merge(get_merge_type())) {
|
||||
if (get_tablet_id().is_ls_inner_tablet() && has_compaction_filter) {
|
||||
// full merge has been setted when preparing compaction filter
|
||||
set_full_merge_and_level(true/*is_full_merge*/);
|
||||
} else {
|
||||
set_full_merge_and_level(false/*is_full_merge*/);
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ struct ObStaticMergeParam final
|
||||
OB_INLINE const ObLSID &get_ls_id() const { return dag_param_.ls_id_; }
|
||||
OB_INLINE const ObTabletID &get_tablet_id() const { return dag_param_.tablet_id_; }
|
||||
|
||||
int cal_minor_merge_param();
|
||||
int cal_minor_merge_param(const bool has_compaction_filter);
|
||||
int cal_major_merge_param();
|
||||
bool is_build_row_store_from_rowkey_cg() const;
|
||||
bool is_build_row_store() const;
|
||||
@ -222,7 +222,7 @@ protected:
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
virtual int prepare_schema();
|
||||
virtual int cal_merge_param() { return static_param_.cal_minor_merge_param(); }
|
||||
virtual int cal_merge_param() { return static_param_.cal_minor_merge_param(false/*has_compaction_filter*/); }
|
||||
int init_parallel_merge_ctx();
|
||||
int init_static_param_and_desc();
|
||||
int init_read_info();
|
||||
|
||||
@ -347,7 +347,8 @@ int ObTabletExeMergeCtx::get_merge_tables(ObGetMergeTablesResult &get_merge_tabl
|
||||
int ObTabletExeMergeCtx::cal_merge_param()
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (OB_FAIL(static_param_.cal_minor_merge_param())) {
|
||||
const bool has_compaction_filter = nullptr != info_collector_.compaction_filter_;
|
||||
if (OB_FAIL(static_param_.cal_minor_merge_param(has_compaction_filter))) {
|
||||
LOG_WARN("failed to cal_major_merge_param", KR(ret));
|
||||
} else if (is_minor_merge(static_param_.get_merge_type())) {
|
||||
if (OB_FAIL(init_static_param_tx_id())) {
|
||||
@ -482,10 +483,7 @@ int ObTabletExeMergeCtx::prepare_compaction_filter()
|
||||
FLOG_INFO("success to init compaction filter", K(tmp_ret), K(recycle_scn));
|
||||
}
|
||||
|
||||
if (OB_SUCCESS == tmp_ret) {
|
||||
static_param_.read_base_version_ = 0;
|
||||
static_param_.set_full_merge_and_level(true/*is_full_merge*/);
|
||||
} else if (OB_NOT_NULL(buf)) {
|
||||
if (OB_SUCCESS != tmp_ret && OB_NOT_NULL(buf)) {
|
||||
mem_ctx_.free(buf);
|
||||
buf = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user