提交 40c4a906 编写于 作者: W wxhwang 提交者: ob-robot

define object type SHARED_TABLET_SUB_META_IN_TABLE

上级 a67707fb
......@@ -109,6 +109,7 @@ static const char *ob_storage_object_type_strs[] = {
"MACRO_CACHE_CKPT_META",
"SHARED_INC_MAJOR_DATA_MACRO",
"SHARED_INC_MAJOR_META_MACRO",
"SHARED_TABLET_SUB_META_IN_TABLE",
"MAX"
};
......@@ -4767,6 +4768,14 @@ int ObSharedIncMajorMetaMacroType::get_object_id(const ObStorageObjectOpt &opt,
opt.ss_share_opt_.ls_id_, opt.ss_share_opt_.reorganization_scn_);
return ret;
}
/**
* ---------------------------------------ObSharedTabletSubMetaInTableType----------------------------------------
*/
bool ObSharedTabletSubMetaInTableType::is_valid(const MacroBlockId &file_id) const
{
return true;
}
const ObStorageObjectTypeBase &ObStorageObjectTypeInstance::get_instance(ObStorageObjectType type)
{
......@@ -5103,6 +5112,10 @@ const ObStorageObjectTypeBase &ObStorageObjectTypeInstance::get_instance(ObStora
static const ObSharedIncMajorMetaMacroType instance;
return instance;
}
case ObStorageObjectType::SHARED_TABLET_SUB_META_IN_TABLE: {
static const ObSharedTabletSubMetaInTableType instance;
return instance;
}
default: {
static const ObStorageObjectTypeBase instance;
return instance;
......
......@@ -113,6 +113,7 @@ enum class ObStorageObjectType : uint8_t
MACRO_CACHE_CKPT_META,
SHARED_INC_MAJOR_DATA_MACRO,
SHARED_INC_MAJOR_META_MACRO,
SHARED_TABLET_SUB_META_IN_TABLE,
MAX
};
static constexpr uint8_t SS_OBJECT_MAX_TYPE_VAL = static_cast<uint8_t>(ObStorageObjectType::MAX);
......@@ -1941,6 +1942,23 @@ public:
virtual int get_object_id(const ObStorageObjectOpt &opt, MacroBlockId &object_id) const;
};
/**
* ---------------------------------------ObSharedTabletSubMetaInTableType----------------------------------------
*/
class ObSharedTabletSubMetaInTableType : public ObStorageObjectTypeBase
{
public:
ObSharedTabletSubMetaInTableType() : ObStorageObjectTypeBase(ObStorageObjectType::SHARED_TABLET_SUB_META_IN_TABLE) {}
virtual ~ObSharedTabletSubMetaInTableType() {}
virtual bool is_tablet_meta() const { return true; }
virtual bool is_shared() const { return true; }
virtual bool is_direct_read() const { return true; }
virtual bool is_direct_write() const { return true; }
virtual bool is_overwrite() const { return true; }
virtual bool is_path_include_inner_tablet() const { return true; }
virtual bool is_valid(const MacroBlockId &file_id) const;
};
} // end namespace blocksstable
} // end namespace oceanbase
......
......@@ -5035,4 +5035,21 @@ int get_object_id(const ObStorageObjectOpt &opt, MacroBlockId &object_id) const
return ret;
}
''',
)
\ No newline at end of file
)
def_storage_object_type_cfg(
obj_type = 'SHARED_TABLET_SUB_META_IN_TABLE', #ObSharedTabletSubMetaInTableType
owner = 'wangxiaohui.wxh',
access_mode = 'shared',
data_type = 'tablet_meta',
read_odirect = True,
write_odirect = True,
is_overwrite = True,
is_path_include_inner_tablet = True,
is_valid = '''
bool is_valid(const MacroBlockId &file_id) const
{
return true;
}
''',
)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册