Merge branch 'column_store'

Co-authored-by: wangt1xiuyi <13547954130@163.com>
Co-authored-by: yangqise7en <877793735@qq.com>
Co-authored-by: Zach41 <zach_41@163.com>
This commit is contained in:
chaser-ch
2023-10-31 15:39:20 +00:00
committed by ob-robot
parent 4057fbc4ae
commit 566e920620
1375 changed files with 239147 additions and 56014 deletions

View File

@ -20,6 +20,7 @@
#include "storage/tablelock/ob_lock_memtable.h"
#include "storage/tx_table/ob_tx_ctx_memtable.h"
#include "storage/tx_table/ob_tx_data_memtable.h"
#include "share/scheduler/ob_tenant_dag_scheduler.h"
using namespace oceanbase;
using namespace oceanbase::blocksstable;
@ -66,6 +67,9 @@ const char* ObITable::table_type_name_[] =
"DDL_DUMP",
"REMOTE_LOGICAL_MINOR",
"DDL_MEM",
"COL_ORIENTED",
"NORMAL_COL_GROUP",
"ROWKEY_COL_GROUP"
};
uint64_t ObITable::TableKey::hash() const
@ -560,12 +564,24 @@ int ObTableHandleV2::set_sstable(ObITable *table, const ObStorageMetaHandle &met
return ret;
}
ObTablesHandleArray::ObTablesHandleArray()
: tablet_id_(),
handles_array_()
{
}
ObTablesHandleArray::ObTablesHandleArray(const uint64_t tenant_id)
: tablet_id_(),
handles_array_()
{
int64_t ctx_id = share::is_reserve_mode()
? ObCtxIds::MERGE_RESERVE_CTX_ID
: ObCtxIds::DEFAULT_CTX_ID;
handles_array_.set_attr(lib::ObMemAttr(tenant_id, "TableHdArray", ctx_id));
}
ObTablesHandleArray::~ObTablesHandleArray()
{
reset();
@ -634,7 +650,11 @@ int ObTablesHandleArray::add_sstable(ObITable *table, const ObStorageMetaHandle
ObStorageMetaKey meta_key(MTL_ID(), addr);
ObStorageMetaHandle handle;
ObSSTable *sstable = nullptr;
if (OB_FAIL(meta_cache.get_meta(ObStorageMetaValue::MetaType::SSTABLE, meta_key, handle, nullptr))) {
ObStorageMetaValue::MetaType meta_type = table->is_co_sstable()
? ObStorageMetaValue::MetaType::CO_SSTABLE
: ObStorageMetaValue::MetaType::SSTABLE;
if (OB_FAIL(meta_cache.get_meta(meta_type, meta_key, handle, nullptr))) {
LOG_WARN("fail to get sstable from meta cache", K(ret), K(addr));
} else if (OB_FAIL(handle.get_sstable(sstable))) {
LOG_WARN("fail to get sstable", K(ret), K(handle));