opt memory usage of schema service
This commit is contained in:
48
deps/oblib/src/lib/hash/ob_pointer_hashmap.h
vendored
48
deps/oblib/src/lib/hash/ob_pointer_hashmap.h
vendored
@ -479,7 +479,7 @@ public:
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < other.sub_map_count_; ++i) {
|
||||
if (NULL == (sub_maps_[i] = create_sub_map(other.sub_maps_[i]))) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
COMMON_LOG(ERROR, "create sub map failed", K(ret));
|
||||
COMMON_LOG(ERROR, "create sub map failed", K(ret), K(*this));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -490,7 +490,7 @@ public:
|
||||
{
|
||||
int ret = assign(other);
|
||||
if (OB_FAIL(ret)) {
|
||||
COMMON_LOG(WARN, "assign failed", K(ret));
|
||||
COMMON_LOG(WARN, "assign failed", K(ret), K(*this));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@ -546,12 +546,12 @@ public:
|
||||
over_write_value = (V(0));
|
||||
|
||||
if (OB_UNLIKELY(OB_SUCCESS != (ret = init()))) {
|
||||
COMMON_LOG(WARN, "not initialize pointer hash map", K(ret));
|
||||
COMMON_LOG(WARN, "not initialize pointer hash map", K(ret), K(*this));
|
||||
} else {
|
||||
ret = find_set_pos(key, value, sub_map_idx, pos, overwrite);
|
||||
if (OB_SUCC(ret)) {
|
||||
if (sub_map_idx < 0 || sub_map_idx >= sub_map_count_) {
|
||||
COMMON_LOG(ERROR, "unexpected error", K(sub_map_idx), K_(sub_map_count));
|
||||
COMMON_LOG(ERROR, "unexpected error", K(*this), K(sub_map_idx), K_(sub_map_count));
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
} else {
|
||||
ret = sub_maps_[sub_map_idx]->set_value(pos, value, over_write_value);
|
||||
@ -597,7 +597,7 @@ public:
|
||||
|
||||
if (OB_UNLIKELY(NULL == sub_maps_[0])) {
|
||||
hash_ret = OB_NOT_INIT;
|
||||
COMMON_LOG_RET(WARN, hash_ret, "not initialize pointer hash map");
|
||||
COMMON_LOG_RET(WARN, hash_ret, "not initialize pointer hash map", K(*this), K(lbt()));
|
||||
} else {
|
||||
for (int64_t i = 0; i < sub_map_count_; ++i) {
|
||||
if (OB_HASH_NOT_EXIST != (hash_ret = sub_maps_[i]->get_refactored(key, value))) {
|
||||
@ -618,7 +618,7 @@ public:
|
||||
const V *ret = NULL;
|
||||
|
||||
if (OB_UNLIKELY(NULL == sub_maps_[0])) {
|
||||
COMMON_LOG_RET(WARN, common::OB_NOT_INIT, "not initialize pointer hash map");
|
||||
COMMON_LOG_RET(WARN, common::OB_NOT_INIT, "not initialize pointer hash map", K(*this), K(lbt()));
|
||||
} else {
|
||||
for (int64_t i = 0; i < sub_map_count_; ++i) {
|
||||
if (NULL != (ret = sub_maps_[i]->get(key))) {
|
||||
@ -635,7 +635,7 @@ public:
|
||||
V *ret = NULL;
|
||||
|
||||
if (OB_UNLIKELY(NULL == sub_maps_[0])) {
|
||||
COMMON_LOG_RET(WARN, common::OB_NOT_INIT, "not initialize pointer hash map");
|
||||
COMMON_LOG_RET(WARN, common::OB_NOT_INIT, "not initialize pointer hash map", K(*this));
|
||||
} else {
|
||||
for (int64_t i = 0; i < sub_map_count_; ++i) {
|
||||
if (NULL != (ret = sub_maps_[i]->get(key))) {
|
||||
@ -652,7 +652,7 @@ public:
|
||||
void dump_keys(void) const
|
||||
{
|
||||
if (OB_UNLIKELY(NULL == sub_maps_[0])) {
|
||||
COMMON_LOG_RET(WARN, common::OB_NOT_INIT, "not initialize pointer hash map");
|
||||
COMMON_LOG_RET(WARN, common::OB_NOT_INIT, "not initialize pointer hash map", K(*this));
|
||||
} else {
|
||||
for (int64_t i = 0; i < sub_map_count_; ++i) {
|
||||
sub_maps_[i]->dump_keys();
|
||||
@ -669,7 +669,7 @@ public:
|
||||
int ret = OB_HASH_NOT_EXIST;
|
||||
|
||||
if (OB_UNLIKELY(NULL == sub_maps_[0])) {
|
||||
COMMON_LOG(WARN, "not initialize pointer hash map");
|
||||
COMMON_LOG(WARN, "not initialize pointer hash map", K(*this));
|
||||
ret = OB_NOT_INIT;
|
||||
} else {
|
||||
// Check each map successively. If one succeeds, we're done!
|
||||
@ -701,7 +701,7 @@ public:
|
||||
ret = sub_maps_[sub_map_id]->erase(it);
|
||||
} else {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
COMMON_LOG(WARN, "invalid input value", K(sub_map_id), K(ret));
|
||||
COMMON_LOG(WARN, "invalid input value", K(ret), K(sub_map_id), K(*this));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -748,7 +748,7 @@ public:
|
||||
if (OB_UNLIKELY(sub_map_id >= 0) && OB_UNLIKELY(sub_map_id < sub_map_count_)) {
|
||||
iter = sub_maps_[sub_map_id]->begin();
|
||||
} else {
|
||||
COMMON_LOG_RET(ERROR, common::OB_INVALID_ARGUMENT, "invalid sub map id", K(sub_map_id), K(sub_map_count_));
|
||||
COMMON_LOG_RET(ERROR, common::OB_INVALID_ARGUMENT, "invalid sub map id", K(*this), K(sub_map_id));
|
||||
}
|
||||
return iter;
|
||||
}
|
||||
@ -759,14 +759,14 @@ public:
|
||||
if (OB_UNLIKELY(sub_map_id >= 0) && OB_UNLIKELY(sub_map_id < sub_map_count_)) {
|
||||
iter = sub_maps_[sub_map_id]->end();
|
||||
} else {
|
||||
COMMON_LOG_RET(ERROR, common::OB_INVALID_ARGUMENT, "invalid sub map id", K(sub_map_id), K(sub_map_count_));
|
||||
COMMON_LOG_RET(ERROR, common::OB_INVALID_ARGUMENT, "invalid sub map id", K(*this), K(sub_map_id));
|
||||
}
|
||||
return iter;
|
||||
}
|
||||
|
||||
int64_t get_sub_map_count() const { return sub_map_count_; }
|
||||
int64_t get_sub_map_mem_size() const { return sub_map_mem_size_; }
|
||||
|
||||
TO_STRING_KV(KP(this), K_(sub_map_count), K_(sub_map_mem_size), K(allocator_.get_label()));
|
||||
private:
|
||||
ObPointerHashMap(const ObPointerHashMap &other, const int64_t resize_to)
|
||||
: sub_map_count_(0), sub_map_mem_size_(resize_to)
|
||||
@ -781,7 +781,7 @@ private:
|
||||
void *sub_map_mem = NULL;
|
||||
|
||||
if (NULL == (sub_map_mem = allocator_.alloc(sub_map_mem_size_))) {
|
||||
COMMON_LOG_RET(ERROR, common::OB_ALLOCATE_MEMORY_FAILED, "failed to allocate memory for sub map", K_(sub_map_mem_size));
|
||||
COMMON_LOG_RET(ERROR, common::OB_ALLOCATE_MEMORY_FAILED, "failed to allocate memory for sub map", K(*this));
|
||||
} else if (NULL != sub_map_in) {
|
||||
sub_map = new(sub_map_mem) SubMap(*sub_map_in);
|
||||
} else {
|
||||
@ -838,7 +838,7 @@ private:
|
||||
SubMap *ret = NULL;
|
||||
int64_t resize_to = 0;
|
||||
bool add_sub_map = false;
|
||||
bool is_need_extend = (count() < (int64_t)(1.1 * (double)item_count()));
|
||||
bool is_need_extend = (count() <= (int64_t)(1.1 * (double)item_count()));
|
||||
int64_t extend_size = (is_need_extend ? (sub_map_mem_size_ * 2) : sub_map_mem_size_);
|
||||
/**
|
||||
* resize sequence: 8K, 16K, 32K, 64K, 128K, 192K, 256K, 512K, 1M, 2M, 4M, 6M, 8M 16M, 32M
|
||||
@ -875,7 +875,7 @@ private:
|
||||
if (OB_MALLOC_NORMAL_BLOCK_SIZE == sub_map_mem_size_) {
|
||||
resize_to = sub_map_count_ * extend_size;
|
||||
if (resize_to > OB_MALLOC_BIG_BLOCK_SIZE) {
|
||||
COMMON_LOG_RET(ERROR, OB_ERR_UNEXPECTED, "unexpected error", K(resize_to));
|
||||
COMMON_LOG_RET(ERROR, OB_ERR_UNEXPECTED, "unexpected error", K(*this), K(resize_to));
|
||||
}
|
||||
} else if (OB_MALLOC_BIG_BLOCK_SIZE == sub_map_mem_size_) {
|
||||
resize_to = sub_map_count_ * extend_size;
|
||||
@ -884,8 +884,8 @@ private:
|
||||
// do nothing
|
||||
}
|
||||
|
||||
COMMON_LOG(INFO, "extend", K(add_sub_map), K_(sub_map_count), "curr_sub_map_mem_size",
|
||||
sub_map_mem_size_, K(resize_to), "count", count(), "item_count", item_count());
|
||||
COMMON_LOG(INFO, "extend hash map", K(*this), K(add_sub_map), K(resize_to),
|
||||
"count", count(), "item_count", item_count());
|
||||
|
||||
if (add_sub_map) {
|
||||
if (sub_map_count_ < MAX_SUB_MAP_COUNT) {
|
||||
@ -894,12 +894,18 @@ private:
|
||||
}
|
||||
} else {
|
||||
// overfollow, return NULL
|
||||
COMMON_LOG_RET(ERROR, common::OB_ERR_UNEXPECTED, "can't add more sub map", K_(sub_map_count));
|
||||
COMMON_LOG_RET(ERROR, common::OB_ERR_UNEXPECTED, "can't add more sub map", K(*this));
|
||||
}
|
||||
} else {
|
||||
ObPointerHashMap tmp(*this, resize_to);
|
||||
this->swap(tmp);
|
||||
ret = sub_maps_[0];
|
||||
if (0 == tmp.get_sub_map_count()) {
|
||||
COMMON_LOG_RET(ERROR, common::OB_ALLOCATE_MEMORY_FAILED, "copy hash map failed", K(*this), K(resize_to));
|
||||
} else {
|
||||
this->swap(tmp);
|
||||
ret = sub_maps_[0];
|
||||
}
|
||||
COMMON_LOG(INFO, "swap hash map", K(*this), K(add_sub_map), K(resize_to),
|
||||
"count", count(), "item_count", item_count());
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@ -85,7 +85,7 @@ class ObContextMgr
|
||||
public:
|
||||
typedef common::ObSortedVector<ObContextSchema *> ContextInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObContextHashWrapper, ObContextSchema *,
|
||||
ObGetContextKey> ObContextMap;
|
||||
ObGetContextKey, 128> ObContextMap;
|
||||
typedef ContextInfos::iterator ContextIter;
|
||||
typedef ContextInfos::const_iterator ConstContextIter;
|
||||
ObContextMgr();
|
||||
|
||||
@ -105,9 +105,9 @@ class ObDbLinkMgr
|
||||
{
|
||||
typedef common::ObSortedVector<ObDbLinkSchema *> DbLinkSchemas;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObDbLinkSchema *,
|
||||
ObGetDbLinkKey> DbLinkIdMap;
|
||||
ObGetDbLinkKey, 128> DbLinkIdMap;
|
||||
typedef common::hash::ObPointerHashMap<ObDbLinkNameHashWrapper, ObDbLinkSchema *,
|
||||
ObGetDbLinkKey> DbLinkNameMap;
|
||||
ObGetDbLinkKey, 128> DbLinkNameMap;
|
||||
typedef DbLinkSchemas::iterator DbLinkIter;
|
||||
typedef DbLinkSchemas::const_iterator ConstDbLinkIter;
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include "lib/hash/ob_pointer_hashmap.h"
|
||||
#include "share/ob_define.h"
|
||||
#include "share/schema/ob_schema_struct.h"
|
||||
#include "lib/container/ob_vector.h"
|
||||
|
||||
namespace oceanbase
|
||||
{
|
||||
@ -126,10 +127,10 @@ public:
|
||||
typedef common::ObSortedVector<ObDirectorySchema *> DirectoryInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObDirectoryNameHashKey,
|
||||
ObDirectorySchema *,
|
||||
ObGetDirectoryKey> ObDirectoryNameMap;
|
||||
ObGetDirectoryKey, 128> ObDirectoryNameMap;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t,
|
||||
ObDirectorySchema *,
|
||||
ObGetDirectoryKey> ObDirectoryIdMap;
|
||||
ObGetDirectoryKey, 128> ObDirectoryIdMap;
|
||||
typedef DirectoryInfos::iterator DirectoryIter;
|
||||
typedef DirectoryInfos::const_iterator ConstDirectoryIter;
|
||||
private:
|
||||
|
||||
@ -73,7 +73,7 @@ class ObKeystoreMgr
|
||||
public:
|
||||
typedef common::ObSortedVector<ObKeystoreSchema *> KeystoreInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObKeystoreHashWrapper, ObKeystoreSchema *,
|
||||
ObGetKeystoreKey> ObKeystoreMap;
|
||||
ObGetKeystoreKey, 128> ObKeystoreMap;
|
||||
typedef KeystoreInfos::iterator KeystoreIter;
|
||||
typedef KeystoreInfos::const_iterator ConstKeystoreIter;
|
||||
ObKeystoreMgr();
|
||||
|
||||
@ -107,11 +107,11 @@ class ObLabelSePolicyMgr
|
||||
public:
|
||||
typedef common::ObSortedVector<ObLabelSePolicySchema *> LabelSePolicyInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObLabelSeNameHashKey, ObLabelSePolicySchema *,
|
||||
ObGetLabelSePolicyKey> ObLabelSePolicyNameMap;
|
||||
ObGetLabelSePolicyKey, 128> ObLabelSePolicyNameMap;
|
||||
typedef common::hash::ObPointerHashMap<ObLabelSeColumnNameHashKey, ObLabelSePolicySchema *,
|
||||
ObGetLabelSePolicyKey> ObLabelSeColumnNameMap;
|
||||
ObGetLabelSePolicyKey, 128> ObLabelSeColumnNameMap;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObLabelSePolicySchema *,
|
||||
ObGetLabelSePolicyKey> ObLabelSePolicyIdMap;
|
||||
ObGetLabelSePolicyKey, 128> ObLabelSePolicyIdMap;
|
||||
typedef LabelSePolicyInfos::iterator LabelSePolicyIter;
|
||||
typedef LabelSePolicyInfos::const_iterator ConstLabelSePolicyIter;
|
||||
ObLabelSePolicyMgr();
|
||||
@ -309,16 +309,16 @@ class ObLabelSeCompMgr
|
||||
public:
|
||||
typedef common::ObSortedVector<ObLabelSeComponentSchema *> LabelSeCompInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObLabelSeCompShortNameHashKey, ObLabelSeComponentSchema *,
|
||||
ObGetLabelSeCompKey> ObLabelSeCompShortNameMap;
|
||||
ObGetLabelSeCompKey, 128> ObLabelSeCompShortNameMap;
|
||||
|
||||
typedef common::hash::ObPointerHashMap<ObLabelSeCompLongNameHashKey, ObLabelSeComponentSchema *,
|
||||
ObGetLabelSeCompKey> ObLabelSeCompLongNameMap;
|
||||
ObGetLabelSeCompKey, 128> ObLabelSeCompLongNameMap;
|
||||
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObLabelSeComponentSchema *,
|
||||
ObGetLabelSeCompKey> ObLabelSeCompIdMap;
|
||||
ObGetLabelSeCompKey, 128> ObLabelSeCompIdMap;
|
||||
|
||||
typedef common::hash::ObPointerHashMap<ObLabelSeCompNumHashKey, ObLabelSeComponentSchema *,
|
||||
ObGetLabelSeCompKey> ObLabelSeCompNumMap;
|
||||
ObGetLabelSeCompKey, 128> ObLabelSeCompNumMap;
|
||||
typedef LabelSeCompInfos::iterator LabelSeCompIter;
|
||||
typedef LabelSeCompInfos::const_iterator ConstLabelSeCompIter;
|
||||
ObLabelSeCompMgr();
|
||||
@ -458,13 +458,13 @@ class ObLabelSeLabelMgr
|
||||
public:
|
||||
typedef common::ObSortedVector<ObLabelSeLabelSchema *> LabelSeLabelInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObLabelSeNameHashKey, ObLabelSeLabelSchema *,
|
||||
ObGetLabelSeLabelKey> ObLabelSeLabelLabelMap;
|
||||
ObGetLabelSeLabelKey, 128> ObLabelSeLabelLabelMap;
|
||||
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObLabelSeLabelSchema *,
|
||||
ObGetLabelSeLabelKey> ObLabelSeLabelIdMap;
|
||||
ObGetLabelSeLabelKey, 128> ObLabelSeLabelIdMap;
|
||||
|
||||
typedef common::hash::ObPointerHashMap<ObLabelSeLabelTagHashKey, ObLabelSeLabelSchema *,
|
||||
ObGetLabelSeLabelKey> ObLabelSeLabelTagMap;
|
||||
ObGetLabelSeLabelKey, 128> ObLabelSeLabelTagMap;
|
||||
|
||||
typedef LabelSeLabelInfos::iterator LabelSeLabelIter;
|
||||
typedef LabelSeLabelInfos::const_iterator ConstLabelSeLabelIter;
|
||||
@ -596,10 +596,10 @@ public:
|
||||
typedef common::ObSortedVector<ObLabelSeUserLevelSchema *> LabelSeUserLevelInfos;
|
||||
|
||||
typedef common::hash::ObPointerHashMap<ObLabelSeUserLevelHashKey, ObLabelSeUserLevelSchema *,
|
||||
ObGetLabelSeUserLevelKey> ObLabelSeUserLevelKeyMap;
|
||||
ObGetLabelSeUserLevelKey, 128> ObLabelSeUserLevelKeyMap;
|
||||
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObLabelSeUserLevelSchema *,
|
||||
ObGetLabelSeUserLevelKey> ObLabelSeUserLevelIdMap;
|
||||
ObGetLabelSeUserLevelKey, 128> ObLabelSeUserLevelIdMap;
|
||||
|
||||
typedef LabelSeUserLevelInfos::iterator LabelSeUserLevelIter;
|
||||
typedef LabelSeUserLevelInfos::const_iterator ConstLabelSeUserLevelIter;
|
||||
|
||||
@ -93,7 +93,7 @@ public:
|
||||
typedef common::ObSortedVector<ObSimpleMockFKParentTableSchema *> MockFKParentTableInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObMockFKParentTableHashWrapper,
|
||||
ObSimpleMockFKParentTableSchema *,
|
||||
ObGetMockFKParentTableKey> MockFKParentTableMap;
|
||||
ObGetMockFKParentTableKey, 128> MockFKParentTableMap;
|
||||
typedef MockFKParentTableInfos::iterator MockFKParentTableIter;
|
||||
typedef MockFKParentTableInfos::const_iterator ConstMockFKParentTableIter;
|
||||
ObMockFKParentTableMgr();
|
||||
|
||||
@ -147,13 +147,13 @@ class ObOutlineMgr
|
||||
{
|
||||
typedef common::ObSortedVector<ObSimpleOutlineSchema *> OutlineInfos;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObSimpleOutlineSchema *,
|
||||
ObGetOutlineKeyV3> OutlineIdMap;
|
||||
ObGetOutlineKeyV3, 128> OutlineIdMap;
|
||||
typedef common::hash::ObPointerHashMap<ObOutlineNameHashWrapper, ObSimpleOutlineSchema *,
|
||||
ObGetOutlineKeyV3> OutlineNameMap;
|
||||
ObGetOutlineKeyV3, 128> OutlineNameMap;
|
||||
typedef common::hash::ObPointerHashMap<ObOutlineSignatureHashWrapper, ObSimpleOutlineSchema *,
|
||||
ObGetOutlineKeyV3> SignatureMap;
|
||||
ObGetOutlineKeyV3, 128> SignatureMap;
|
||||
typedef common::hash::ObPointerHashMap<ObOutlineSqlIdHashWrapper, ObSimpleOutlineSchema *,
|
||||
ObGetOutlineKeyV3> SqlIdMap;
|
||||
ObGetOutlineKeyV3, 128> SqlIdMap;
|
||||
typedef OutlineInfos::iterator OutlineIter;
|
||||
typedef OutlineInfos::const_iterator ConstOutlineIter;
|
||||
public:
|
||||
|
||||
@ -253,9 +253,9 @@ class ObPackageMgr
|
||||
{
|
||||
typedef common::ObSortedVector<ObSimplePackageSchema *> PackageInfos;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObSimplePackageSchema *,
|
||||
ObGetPackageKey> PackageIdMap;
|
||||
ObGetPackageKey, 1024> PackageIdMap;
|
||||
typedef common::hash::ObPointerHashMap<ObPackageNameHashWrapper, ObSimplePackageSchema *,
|
||||
ObGetPackageKey> PackageNameMap;
|
||||
ObGetPackageKey, 1024> PackageNameMap;
|
||||
typedef PackageInfos::iterator PackageIter;
|
||||
typedef PackageInfos::const_iterator ConstPackageIter;
|
||||
public:
|
||||
|
||||
@ -72,8 +72,8 @@ class ObPrivMgr
|
||||
typedef common::ObSortedVector<ObTablePriv *> TablePrivInfos;
|
||||
typedef common::ObSortedVector<ObObjPriv *>ObjPrivInfos;
|
||||
typedef common::ObSortedVector<ObSysPriv *>SysPrivInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObTablePrivSortKey, ObTablePriv *, ObGetTablePrivKeyV3> TablePrivMap;
|
||||
typedef common::hash::ObPointerHashMap<ObObjPrivSortKey, ObObjPriv *, ObGetObjPrivKey> ObjPrivMap;
|
||||
typedef common::hash::ObPointerHashMap<ObTablePrivSortKey, ObTablePriv *, ObGetTablePrivKeyV3, 128> TablePrivMap;
|
||||
typedef common::hash::ObPointerHashMap<ObObjPrivSortKey, ObObjPriv *, ObGetObjPrivKey, 128> ObjPrivMap;
|
||||
typedef DBPrivInfos::iterator DBPrivIter;
|
||||
typedef DBPrivInfos::const_iterator ConstDBPrivIter;
|
||||
typedef TablePrivInfos::iterator TablePrivIter;
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
#include "lib/hash/ob_pointer_hashmap.h"
|
||||
#include "share/ob_define.h"
|
||||
#include "share/schema/ob_schema_struct.h"
|
||||
#include "lib/container/ob_vector.h"
|
||||
|
||||
namespace oceanbase
|
||||
{
|
||||
@ -85,9 +86,9 @@ class ObProfileMgr
|
||||
public:
|
||||
typedef common::ObSortedVector<ObProfileSchema *> ProfileInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObProfileNameHashKey, ObProfileSchema *,
|
||||
ObGetProfileKey> ObProfileNameMap;
|
||||
ObGetProfileKey, 128> ObProfileNameMap;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObProfileSchema *,
|
||||
ObGetProfileKey> ObProfileIdMap;
|
||||
ObGetProfileKey, 128> ObProfileIdMap;
|
||||
typedef ProfileInfos::iterator ProfileIter;
|
||||
typedef ProfileInfos::const_iterator ConstProfileIter;
|
||||
ObProfileMgr();
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include "lib/hash/ob_pointer_hashmap.h"
|
||||
#include "share/ob_define.h"
|
||||
#include "share/schema/ob_schema_struct.h"
|
||||
#include "lib/container/ob_vector.h"
|
||||
|
||||
namespace oceanbase
|
||||
{
|
||||
@ -140,10 +141,10 @@ public:
|
||||
typedef common::ObSortedVector<ObRlsPolicySchema *> RlsPolicyInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObRlsPolicyNameHashKey,
|
||||
ObRlsPolicySchema *,
|
||||
ObGetRlsPolicyKey> ObRlsPolicyNameMap;
|
||||
ObGetRlsPolicyKey, 128> ObRlsPolicyNameMap;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t,
|
||||
ObRlsPolicySchema *,
|
||||
ObGetRlsPolicyKey> ObRlsPolicyIdMap;
|
||||
ObGetRlsPolicyKey, 128> ObRlsPolicyIdMap;
|
||||
typedef RlsPolicyInfos::iterator RlsPolicyIter;
|
||||
typedef RlsPolicyInfos::const_iterator ConstRlsPolicyIter;
|
||||
private:
|
||||
@ -284,10 +285,10 @@ public:
|
||||
typedef common::ObSortedVector<ObRlsGroupSchema *> RlsGroupInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObRlsGroupNameHashKey,
|
||||
ObRlsGroupSchema *,
|
||||
ObGetRlsGroupKey> ObRlsGroupNameMap;
|
||||
ObGetRlsGroupKey, 128> ObRlsGroupNameMap;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t,
|
||||
ObRlsGroupSchema *,
|
||||
ObGetRlsGroupKey> ObRlsGroupIdMap;
|
||||
ObGetRlsGroupKey, 128> ObRlsGroupIdMap;
|
||||
typedef RlsGroupInfos::iterator RlsGroupIter;
|
||||
typedef RlsGroupInfos::const_iterator ConstRlsGroupIter;
|
||||
private:
|
||||
@ -435,10 +436,10 @@ public:
|
||||
typedef common::ObSortedVector<ObRlsContextSchema *> RlsContextInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObRlsContextNameHashKey,
|
||||
ObRlsContextSchema *,
|
||||
ObGetRlsContextKey> ObRlsContextNameMap;
|
||||
ObGetRlsContextKey, 128> ObRlsContextNameMap;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t,
|
||||
ObRlsContextSchema *,
|
||||
ObGetRlsContextKey> ObRlsContextIdMap;
|
||||
ObGetRlsContextKey, 128> ObRlsContextIdMap;
|
||||
typedef RlsContextInfos::iterator RlsContextIter;
|
||||
typedef RlsContextInfos::const_iterator ConstRlsContextIter;
|
||||
private:
|
||||
|
||||
@ -256,9 +256,9 @@ class ObRoutineMgr
|
||||
{
|
||||
typedef common::ObSortedVector<ObSimpleRoutineSchema *> RoutineInfos;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObSimpleRoutineSchema *,
|
||||
ObGetRoutineKey> RoutineIdMap;
|
||||
ObGetRoutineKey, 1024> RoutineIdMap;
|
||||
typedef common::hash::ObPointerHashMap<ObRoutineNameHashWrapper, ObSimpleRoutineSchema *,
|
||||
ObGetRoutineKey> RoutineNameMap;
|
||||
ObGetRoutineKey, 1024> RoutineNameMap;
|
||||
typedef RoutineInfos::iterator RoutineIter;
|
||||
typedef RoutineInfos::const_iterator ConstRoutineIter;
|
||||
public:
|
||||
|
||||
@ -489,16 +489,16 @@ typedef TableInfos::iterator TableIterator;
|
||||
typedef TableInfos::const_iterator ConstTableIterator;
|
||||
typedef DropTenantInfos::iterator DropTenantInfoIterator;
|
||||
typedef DropTenantInfos::const_iterator ConstDropTenantInfoIterator;
|
||||
typedef common::hash::ObPointerHashMap<ObDatabaseSchemaHashWrapper, ObSimpleDatabaseSchema *, GetTableKeyV2> DatabaseNameMap;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObSimpleTableSchemaV2 *, GetTableKeyV2> TableIdMap;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObSimpleDatabaseSchema *, GetTableKeyV2> DatabaseIdMap;
|
||||
typedef common::hash::ObPointerHashMap<ObTableSchemaHashWrapper, ObSimpleTableSchemaV2 *, GetTableKeyV2> TableNameMap;
|
||||
typedef common::hash::ObPointerHashMap<ObIndexSchemaHashWrapper, ObSimpleTableSchemaV2 *, GetTableKeyV2> IndexNameMap;
|
||||
typedef common::hash::ObPointerHashMap<ObAuxVPSchemaHashWrapper, ObSimpleTableSchemaV2 *, GetTableKeyV2> AuxVPNameMap;
|
||||
typedef common::hash::ObPointerHashMap<ObAuxVPSchemaHashWrapper, ObSimpleTableSchemaV2 *, GetTableKeyV2> LobMetaNameMap;
|
||||
typedef common::hash::ObPointerHashMap<ObAuxVPSchemaHashWrapper, ObSimpleTableSchemaV2 *, GetTableKeyV2> LobPieceNameMap;
|
||||
typedef common::hash::ObPointerHashMap<ObForeignKeyInfoHashWrapper, ObSimpleForeignKeyInfo *, GetTableKeyV2> ForeignKeyNameMap;
|
||||
typedef common::hash::ObPointerHashMap<ObConstraintInfoHashWrapper, ObSimpleConstraintInfo *, GetTableKeyV2> ConstraintNameMap;
|
||||
typedef common::hash::ObPointerHashMap<ObDatabaseSchemaHashWrapper, ObSimpleDatabaseSchema *, GetTableKeyV2, 128> DatabaseNameMap;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObSimpleTableSchemaV2 *, GetTableKeyV2, 1024> TableIdMap;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObSimpleDatabaseSchema *, GetTableKeyV2, 128> DatabaseIdMap;
|
||||
typedef common::hash::ObPointerHashMap<ObTableSchemaHashWrapper, ObSimpleTableSchemaV2 *, GetTableKeyV2, 1024> TableNameMap;
|
||||
typedef common::hash::ObPointerHashMap<ObIndexSchemaHashWrapper, ObSimpleTableSchemaV2 *, GetTableKeyV2, 1024> IndexNameMap;
|
||||
typedef common::hash::ObPointerHashMap<ObAuxVPSchemaHashWrapper, ObSimpleTableSchemaV2 *, GetTableKeyV2, 128> AuxVPNameMap;
|
||||
typedef common::hash::ObPointerHashMap<ObAuxVPSchemaHashWrapper, ObSimpleTableSchemaV2 *, GetTableKeyV2, 128> LobMetaNameMap;
|
||||
typedef common::hash::ObPointerHashMap<ObAuxVPSchemaHashWrapper, ObSimpleTableSchemaV2 *, GetTableKeyV2, 128> LobPieceNameMap;
|
||||
typedef common::hash::ObPointerHashMap<ObForeignKeyInfoHashWrapper, ObSimpleForeignKeyInfo *, GetTableKeyV2, 128> ForeignKeyNameMap;
|
||||
typedef common::hash::ObPointerHashMap<ObConstraintInfoHashWrapper, ObSimpleConstraintInfo *, GetTableKeyV2, 128> ConstraintNameMap;
|
||||
public:
|
||||
ObSchemaMgr();
|
||||
explicit ObSchemaMgr(common::ObIAllocator &allocator);
|
||||
|
||||
@ -108,7 +108,7 @@ class ObSAuditMgr
|
||||
public:
|
||||
typedef common::ObSortedVector<ObSAuditSchema *> AuditInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObAuditHashWrapper, ObSAuditSchema *,
|
||||
ObGetAuditKey> ObAuditMap;
|
||||
ObGetAuditKey, 128> ObAuditMap;
|
||||
typedef AuditInfos::iterator AuditIter;
|
||||
typedef AuditInfos::const_iterator ConstAuditIter;
|
||||
ObSAuditMgr();
|
||||
|
||||
@ -93,7 +93,7 @@ class ObSequenceMgr
|
||||
public:
|
||||
typedef common::ObSortedVector<ObSequenceSchema *> SequenceInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObSequenceHashWrapper, ObSequenceSchema *,
|
||||
ObGetSequenceKey> ObSequenceMap;
|
||||
ObGetSequenceKey, 128> ObSequenceMap;
|
||||
typedef SequenceInfos::iterator SequenceIter;
|
||||
typedef SequenceInfos::const_iterator ConstSequenceIter;
|
||||
ObSequenceMgr();
|
||||
|
||||
@ -163,9 +163,9 @@ class ObSynonymMgr
|
||||
public:
|
||||
typedef common::ObSortedVector<ObSimpleSynonymSchema *> SynonymInfos;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObSimpleSynonymSchema *,
|
||||
ObGetSynonymKey> ObSynonymIdMap;
|
||||
ObGetSynonymKey, 128> ObSynonymIdMap;
|
||||
typedef common::hash::ObPointerHashMap<ObSynonymHashWrapper, ObSimpleSynonymSchema *,
|
||||
ObGetSynonymKey> ObSynonymNameMap;
|
||||
ObGetSynonymKey, 128> ObSynonymNameMap;
|
||||
typedef SynonymInfos::iterator SynonymIter;
|
||||
typedef SynonymInfos::const_iterator ConstSynonymIter;
|
||||
ObSynonymMgr();
|
||||
|
||||
@ -107,7 +107,7 @@ class ObSysVariableMgr
|
||||
{
|
||||
public:
|
||||
typedef common::ObSortedVector<ObSimpleSysVariableSchema *> SysVariableInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObSysVariableHashWrapper, ObSimpleSysVariableSchema *, ObGetSysVariableKey> ObSysVariableMap;
|
||||
typedef common::hash::ObPointerHashMap<ObSysVariableHashWrapper, ObSimpleSysVariableSchema *, ObGetSysVariableKey, 128> ObSysVariableMap;
|
||||
typedef SysVariableInfos::iterator SysVariableIter;
|
||||
typedef SysVariableInfos::const_iterator ConstSysVariableIter;
|
||||
ObSysVariableMgr();
|
||||
|
||||
@ -92,7 +92,7 @@ class ObTablespaceMgr
|
||||
public:
|
||||
typedef common::ObSortedVector<ObTablespaceSchema *> TablespaceInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObTablespaceHashWrapper, ObTablespaceSchema *,
|
||||
ObGetTablespaceKey> ObTablespaceMap;
|
||||
ObGetTablespaceKey, 128> ObTablespaceMap;
|
||||
typedef TablespaceInfos::iterator TablespaceIter;
|
||||
typedef TablespaceInfos::const_iterator ConstTablespaceIter;
|
||||
ObTablespaceMgr();
|
||||
|
||||
@ -236,9 +236,9 @@ class ObTriggerMgr
|
||||
{
|
||||
typedef common::ObSortedVector<ObSimpleTriggerSchema *> TriggerInfos;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObSimpleTriggerSchema *,
|
||||
ObGetTriggerKey> TriggerIdMap;
|
||||
ObGetTriggerKey, 128> TriggerIdMap;
|
||||
typedef common::hash::ObPointerHashMap<ObTriggerNameHashWrapper, ObSimpleTriggerSchema *,
|
||||
ObGetTriggerKey> TriggerNameMap;
|
||||
ObGetTriggerKey, 128> TriggerNameMap;
|
||||
typedef TriggerInfos::iterator TriggerIter;
|
||||
typedef TriggerInfos::const_iterator ConstTriggerIter;
|
||||
public:
|
||||
|
||||
@ -143,7 +143,7 @@ class ObUDFMgr
|
||||
{
|
||||
public:
|
||||
typedef common::ObSortedVector<ObSimpleUDFSchema *> UDFInfos;
|
||||
typedef common::hash::ObPointerHashMap<ObUDFHashWrapper, ObSimpleUDFSchema *, ObGetUDFKey> ObUDFMap;
|
||||
typedef common::hash::ObPointerHashMap<ObUDFHashWrapper, ObSimpleUDFSchema *, ObGetUDFKey, 128> ObUDFMap;
|
||||
typedef UDFInfos::iterator UDFIter;
|
||||
typedef UDFInfos::const_iterator ConstUDFIter;
|
||||
ObUDFMgr();
|
||||
|
||||
@ -237,9 +237,9 @@ class ObUDTMgr
|
||||
{
|
||||
typedef common::ObSortedVector<ObSimpleUDTSchema *> UDTInfos;
|
||||
typedef common::hash::ObPointerHashMap<uint64_t, ObSimpleUDTSchema *,
|
||||
ObGetUDTKey> UDTIdMap;
|
||||
ObGetUDTKey, 512> UDTIdMap;
|
||||
typedef common::hash::ObPointerHashMap<ObUDTNameHashWrapper, ObSimpleUDTSchema *,
|
||||
ObGetUDTKey> UDTNameMap;
|
||||
ObGetUDTKey, 512> UDTNameMap;
|
||||
typedef UDTInfos::iterator UDTIter;
|
||||
typedef UDTInfos::const_iterator ConstUDTIter;
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user