init cs meta for row store co sstable when init

This commit is contained in:
Tsunaou 2024-05-30 11:53:20 +00:00 committed by ob-robot
parent e8f5de0a1a
commit 01b518b9c7
3 changed files with 5 additions and 5 deletions

View File

@ -489,9 +489,6 @@ int ObCOTabletMergeCtx::create_sstable(const ObSSTable *&new_sstable)
ret = OB_ERR_UNEXPECTED;
LOG_WARN("get unexpected cg sstable", K(ret), KPC(base_co_table), K(cg_tables_handle), K(cg_schemas));
CTX_SET_DIAGNOSE_LOCATION(*this);
} else if (OB_FAIL(co_sstable->build_cs_meta_without_cgs())) {
LOG_WARN("failed to build cs meta without cgs", K(ret), KPC(this));
CTX_SET_DIAGNOSE_LOCATION(*this);
} else {
// only exist one co table here, emtpy or empty cg sstables
new_sstable = static_cast<ObSSTable *>(base_co_table);

View File

@ -258,11 +258,14 @@ int ObCOSSTableV2::init(
} else if (param.is_co_table_without_cgs_) {
// current co sstable is empty, or the normal cg is redundant, no need to init cg sstable
cs_meta_.column_group_cnt_ = param.column_group_cnt_; // other cs meta is zero.
is_cgs_empty_co_ = true;
if (OB_FAIL(build_cs_meta_without_cgs())) {
LOG_WARN("failed to build cs meta without cgs", K(ret), K(param), KPC(this));
}
}
if (OB_SUCC(ret)) {
base_type_ = static_cast<ObCOSSTableBaseType>(param.co_base_type_);
is_cgs_empty_co_ = param.is_co_table_without_cgs_;
valid_for_cs_reading_ = param.is_co_table_without_cgs_;
cs_meta_.full_column_cnt_ = param.full_column_cnt_;
} else {

View File

@ -143,7 +143,6 @@ public:
bool is_row_store_only_co_table() const { return is_cgs_empty_co_ && is_all_cg_base(); }
bool is_cgs_empty_co_table() const { return is_cgs_empty_co_; }
int fill_cg_sstables(const common::ObIArray<ObITable *> &cg_tables);
int build_cs_meta_without_cgs();
OB_INLINE const ObCOSSTableMeta &get_cs_meta() const { return cs_meta_; }
OB_INLINE bool is_all_cg_base() const { return ObCOSSTableBaseType::ALL_CG_TYPE == base_type_; }
OB_INLINE bool is_rowkey_cg_base() const { return ObCOSSTableBaseType::ROWKEY_CG_TYPE == base_type_; }
@ -213,6 +212,7 @@ public:
K_(base_type), K_(is_cgs_empty_co), K_(valid_for_cs_reading));
private:
int build_cs_meta();
int build_cs_meta_without_cgs();
protected:
ObCOSSTableMeta cs_meta_;
ObCOSSTableBaseType base_type_;