From d9e3c7357da824871f26ba3c8e8f76c3d8c1246d Mon Sep 17 00:00:00 2001 From: obdev Date: Fri, 26 May 2023 13:16:48 +0000 Subject: [PATCH] opt memory usage of schema service --- deps/oblib/src/lib/hash/ob_pointer_hashmap.h | 48 +++++++++++-------- src/share/schema/ob_context_mgr.h | 2 +- src/share/schema/ob_dblink_mgr.h | 4 +- src/share/schema/ob_directory_mgr.h | 5 +- src/share/schema/ob_keystore_mgr.h | 2 +- src/share/schema/ob_label_se_policy_mgr.h | 24 +++++----- .../schema/ob_mock_fk_parent_table_mgr.h | 2 +- src/share/schema/ob_outline_mgr.h | 8 ++-- src/share/schema/ob_package_mgr.h | 4 +- src/share/schema/ob_priv_mgr.h | 4 +- src/share/schema/ob_profile_mgr.h | 5 +- src/share/schema/ob_rls_mgr.h | 13 ++--- src/share/schema/ob_routine_mgr.h | 4 +- src/share/schema/ob_schema_mgr.h | 20 ++++---- src/share/schema/ob_security_audit_mgr.h | 2 +- src/share/schema/ob_sequence_mgr.h | 2 +- src/share/schema/ob_synonym_mgr.h | 4 +- src/share/schema/ob_sys_variable_mgr.h | 2 +- src/share/schema/ob_tablespace_mgr.h | 2 +- src/share/schema/ob_trigger_mgr.h | 4 +- src/share/schema/ob_udf_mgr.h | 2 +- src/share/schema/ob_udt_mgr.h | 4 +- 22 files changed, 88 insertions(+), 79 deletions(-) diff --git a/deps/oblib/src/lib/hash/ob_pointer_hashmap.h b/deps/oblib/src/lib/hash/ob_pointer_hashmap.h index aa1163b641..ebee5adae1 100644 --- a/deps/oblib/src/lib/hash/ob_pointer_hashmap.h +++ b/deps/oblib/src/lib/hash/ob_pointer_hashmap.h @@ -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; diff --git a/src/share/schema/ob_context_mgr.h b/src/share/schema/ob_context_mgr.h index b09b190d94..0b376d82cd 100644 --- a/src/share/schema/ob_context_mgr.h +++ b/src/share/schema/ob_context_mgr.h @@ -85,7 +85,7 @@ class ObContextMgr public: typedef common::ObSortedVector ContextInfos; typedef common::hash::ObPointerHashMap ObContextMap; + ObGetContextKey, 128> ObContextMap; typedef ContextInfos::iterator ContextIter; typedef ContextInfos::const_iterator ConstContextIter; ObContextMgr(); diff --git a/src/share/schema/ob_dblink_mgr.h b/src/share/schema/ob_dblink_mgr.h index 7f58e95695..f5f8122e12 100644 --- a/src/share/schema/ob_dblink_mgr.h +++ b/src/share/schema/ob_dblink_mgr.h @@ -105,9 +105,9 @@ class ObDbLinkMgr { typedef common::ObSortedVector DbLinkSchemas; typedef common::hash::ObPointerHashMap DbLinkIdMap; + ObGetDbLinkKey, 128> DbLinkIdMap; typedef common::hash::ObPointerHashMap DbLinkNameMap; + ObGetDbLinkKey, 128> DbLinkNameMap; typedef DbLinkSchemas::iterator DbLinkIter; typedef DbLinkSchemas::const_iterator ConstDbLinkIter; diff --git a/src/share/schema/ob_directory_mgr.h b/src/share/schema/ob_directory_mgr.h index b6646498d4..44c0fb8be9 100644 --- a/src/share/schema/ob_directory_mgr.h +++ b/src/share/schema/ob_directory_mgr.h @@ -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 DirectoryInfos; typedef common::hash::ObPointerHashMap ObDirectoryNameMap; + ObGetDirectoryKey, 128> ObDirectoryNameMap; typedef common::hash::ObPointerHashMap ObDirectoryIdMap; + ObGetDirectoryKey, 128> ObDirectoryIdMap; typedef DirectoryInfos::iterator DirectoryIter; typedef DirectoryInfos::const_iterator ConstDirectoryIter; private: diff --git a/src/share/schema/ob_keystore_mgr.h b/src/share/schema/ob_keystore_mgr.h index a899e52479..1026e83509 100644 --- a/src/share/schema/ob_keystore_mgr.h +++ b/src/share/schema/ob_keystore_mgr.h @@ -73,7 +73,7 @@ class ObKeystoreMgr public: typedef common::ObSortedVector KeystoreInfos; typedef common::hash::ObPointerHashMap ObKeystoreMap; + ObGetKeystoreKey, 128> ObKeystoreMap; typedef KeystoreInfos::iterator KeystoreIter; typedef KeystoreInfos::const_iterator ConstKeystoreIter; ObKeystoreMgr(); diff --git a/src/share/schema/ob_label_se_policy_mgr.h b/src/share/schema/ob_label_se_policy_mgr.h index 6776424231..92a5527006 100644 --- a/src/share/schema/ob_label_se_policy_mgr.h +++ b/src/share/schema/ob_label_se_policy_mgr.h @@ -107,11 +107,11 @@ class ObLabelSePolicyMgr public: typedef common::ObSortedVector LabelSePolicyInfos; typedef common::hash::ObPointerHashMap ObLabelSePolicyNameMap; + ObGetLabelSePolicyKey, 128> ObLabelSePolicyNameMap; typedef common::hash::ObPointerHashMap ObLabelSeColumnNameMap; + ObGetLabelSePolicyKey, 128> ObLabelSeColumnNameMap; typedef common::hash::ObPointerHashMap ObLabelSePolicyIdMap; + ObGetLabelSePolicyKey, 128> ObLabelSePolicyIdMap; typedef LabelSePolicyInfos::iterator LabelSePolicyIter; typedef LabelSePolicyInfos::const_iterator ConstLabelSePolicyIter; ObLabelSePolicyMgr(); @@ -309,16 +309,16 @@ class ObLabelSeCompMgr public: typedef common::ObSortedVector LabelSeCompInfos; typedef common::hash::ObPointerHashMap ObLabelSeCompShortNameMap; + ObGetLabelSeCompKey, 128> ObLabelSeCompShortNameMap; typedef common::hash::ObPointerHashMap ObLabelSeCompLongNameMap; + ObGetLabelSeCompKey, 128> ObLabelSeCompLongNameMap; typedef common::hash::ObPointerHashMap ObLabelSeCompIdMap; + ObGetLabelSeCompKey, 128> ObLabelSeCompIdMap; typedef common::hash::ObPointerHashMap ObLabelSeCompNumMap; + ObGetLabelSeCompKey, 128> ObLabelSeCompNumMap; typedef LabelSeCompInfos::iterator LabelSeCompIter; typedef LabelSeCompInfos::const_iterator ConstLabelSeCompIter; ObLabelSeCompMgr(); @@ -458,13 +458,13 @@ class ObLabelSeLabelMgr public: typedef common::ObSortedVector LabelSeLabelInfos; typedef common::hash::ObPointerHashMap ObLabelSeLabelLabelMap; + ObGetLabelSeLabelKey, 128> ObLabelSeLabelLabelMap; typedef common::hash::ObPointerHashMap ObLabelSeLabelIdMap; + ObGetLabelSeLabelKey, 128> ObLabelSeLabelIdMap; typedef common::hash::ObPointerHashMap ObLabelSeLabelTagMap; + ObGetLabelSeLabelKey, 128> ObLabelSeLabelTagMap; typedef LabelSeLabelInfos::iterator LabelSeLabelIter; typedef LabelSeLabelInfos::const_iterator ConstLabelSeLabelIter; @@ -596,10 +596,10 @@ public: typedef common::ObSortedVector LabelSeUserLevelInfos; typedef common::hash::ObPointerHashMap ObLabelSeUserLevelKeyMap; + ObGetLabelSeUserLevelKey, 128> ObLabelSeUserLevelKeyMap; typedef common::hash::ObPointerHashMap ObLabelSeUserLevelIdMap; + ObGetLabelSeUserLevelKey, 128> ObLabelSeUserLevelIdMap; typedef LabelSeUserLevelInfos::iterator LabelSeUserLevelIter; typedef LabelSeUserLevelInfos::const_iterator ConstLabelSeUserLevelIter; diff --git a/src/share/schema/ob_mock_fk_parent_table_mgr.h b/src/share/schema/ob_mock_fk_parent_table_mgr.h index 654550954b..8c50cc8df8 100644 --- a/src/share/schema/ob_mock_fk_parent_table_mgr.h +++ b/src/share/schema/ob_mock_fk_parent_table_mgr.h @@ -93,7 +93,7 @@ public: typedef common::ObSortedVector MockFKParentTableInfos; typedef common::hash::ObPointerHashMap MockFKParentTableMap; + ObGetMockFKParentTableKey, 128> MockFKParentTableMap; typedef MockFKParentTableInfos::iterator MockFKParentTableIter; typedef MockFKParentTableInfos::const_iterator ConstMockFKParentTableIter; ObMockFKParentTableMgr(); diff --git a/src/share/schema/ob_outline_mgr.h b/src/share/schema/ob_outline_mgr.h index bc0b26c81a..7757eca7b1 100644 --- a/src/share/schema/ob_outline_mgr.h +++ b/src/share/schema/ob_outline_mgr.h @@ -147,13 +147,13 @@ class ObOutlineMgr { typedef common::ObSortedVector OutlineInfos; typedef common::hash::ObPointerHashMap OutlineIdMap; + ObGetOutlineKeyV3, 128> OutlineIdMap; typedef common::hash::ObPointerHashMap OutlineNameMap; + ObGetOutlineKeyV3, 128> OutlineNameMap; typedef common::hash::ObPointerHashMap SignatureMap; + ObGetOutlineKeyV3, 128> SignatureMap; typedef common::hash::ObPointerHashMap SqlIdMap; + ObGetOutlineKeyV3, 128> SqlIdMap; typedef OutlineInfos::iterator OutlineIter; typedef OutlineInfos::const_iterator ConstOutlineIter; public: diff --git a/src/share/schema/ob_package_mgr.h b/src/share/schema/ob_package_mgr.h index 1ea7e422eb..9ade976bd8 100644 --- a/src/share/schema/ob_package_mgr.h +++ b/src/share/schema/ob_package_mgr.h @@ -253,9 +253,9 @@ class ObPackageMgr { typedef common::ObSortedVector PackageInfos; typedef common::hash::ObPointerHashMap PackageIdMap; + ObGetPackageKey, 1024> PackageIdMap; typedef common::hash::ObPointerHashMap PackageNameMap; + ObGetPackageKey, 1024> PackageNameMap; typedef PackageInfos::iterator PackageIter; typedef PackageInfos::const_iterator ConstPackageIter; public: diff --git a/src/share/schema/ob_priv_mgr.h b/src/share/schema/ob_priv_mgr.h index d16e5a6bc1..fa5a1d5887 100644 --- a/src/share/schema/ob_priv_mgr.h +++ b/src/share/schema/ob_priv_mgr.h @@ -72,8 +72,8 @@ class ObPrivMgr typedef common::ObSortedVector TablePrivInfos; typedef common::ObSortedVectorObjPrivInfos; typedef common::ObSortedVectorSysPrivInfos; - typedef common::hash::ObPointerHashMap TablePrivMap; - typedef common::hash::ObPointerHashMap ObjPrivMap; + typedef common::hash::ObPointerHashMap TablePrivMap; + typedef common::hash::ObPointerHashMap ObjPrivMap; typedef DBPrivInfos::iterator DBPrivIter; typedef DBPrivInfos::const_iterator ConstDBPrivIter; typedef TablePrivInfos::iterator TablePrivIter; diff --git a/src/share/schema/ob_profile_mgr.h b/src/share/schema/ob_profile_mgr.h index bf13867c8d..48df93ff7a 100644 --- a/src/share/schema/ob_profile_mgr.h +++ b/src/share/schema/ob_profile_mgr.h @@ -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 ProfileInfos; typedef common::hash::ObPointerHashMap ObProfileNameMap; + ObGetProfileKey, 128> ObProfileNameMap; typedef common::hash::ObPointerHashMap ObProfileIdMap; + ObGetProfileKey, 128> ObProfileIdMap; typedef ProfileInfos::iterator ProfileIter; typedef ProfileInfos::const_iterator ConstProfileIter; ObProfileMgr(); diff --git a/src/share/schema/ob_rls_mgr.h b/src/share/schema/ob_rls_mgr.h index 3b0a411ea0..ca29640368 100644 --- a/src/share/schema/ob_rls_mgr.h +++ b/src/share/schema/ob_rls_mgr.h @@ -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 RlsPolicyInfos; typedef common::hash::ObPointerHashMap ObRlsPolicyNameMap; + ObGetRlsPolicyKey, 128> ObRlsPolicyNameMap; typedef common::hash::ObPointerHashMap ObRlsPolicyIdMap; + ObGetRlsPolicyKey, 128> ObRlsPolicyIdMap; typedef RlsPolicyInfos::iterator RlsPolicyIter; typedef RlsPolicyInfos::const_iterator ConstRlsPolicyIter; private: @@ -284,10 +285,10 @@ public: typedef common::ObSortedVector RlsGroupInfos; typedef common::hash::ObPointerHashMap ObRlsGroupNameMap; + ObGetRlsGroupKey, 128> ObRlsGroupNameMap; typedef common::hash::ObPointerHashMap ObRlsGroupIdMap; + ObGetRlsGroupKey, 128> ObRlsGroupIdMap; typedef RlsGroupInfos::iterator RlsGroupIter; typedef RlsGroupInfos::const_iterator ConstRlsGroupIter; private: @@ -435,10 +436,10 @@ public: typedef common::ObSortedVector RlsContextInfos; typedef common::hash::ObPointerHashMap ObRlsContextNameMap; + ObGetRlsContextKey, 128> ObRlsContextNameMap; typedef common::hash::ObPointerHashMap ObRlsContextIdMap; + ObGetRlsContextKey, 128> ObRlsContextIdMap; typedef RlsContextInfos::iterator RlsContextIter; typedef RlsContextInfos::const_iterator ConstRlsContextIter; private: diff --git a/src/share/schema/ob_routine_mgr.h b/src/share/schema/ob_routine_mgr.h index 4d54a180ae..95e00383e3 100644 --- a/src/share/schema/ob_routine_mgr.h +++ b/src/share/schema/ob_routine_mgr.h @@ -256,9 +256,9 @@ class ObRoutineMgr { typedef common::ObSortedVector RoutineInfos; typedef common::hash::ObPointerHashMap RoutineIdMap; + ObGetRoutineKey, 1024> RoutineIdMap; typedef common::hash::ObPointerHashMap RoutineNameMap; + ObGetRoutineKey, 1024> RoutineNameMap; typedef RoutineInfos::iterator RoutineIter; typedef RoutineInfos::const_iterator ConstRoutineIter; public: diff --git a/src/share/schema/ob_schema_mgr.h b/src/share/schema/ob_schema_mgr.h index 9ae97dc01c..27b367dbbe 100644 --- a/src/share/schema/ob_schema_mgr.h +++ b/src/share/schema/ob_schema_mgr.h @@ -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 DatabaseNameMap; -typedef common::hash::ObPointerHashMap TableIdMap; -typedef common::hash::ObPointerHashMap DatabaseIdMap; -typedef common::hash::ObPointerHashMap TableNameMap; -typedef common::hash::ObPointerHashMap IndexNameMap; -typedef common::hash::ObPointerHashMap AuxVPNameMap; -typedef common::hash::ObPointerHashMap LobMetaNameMap; -typedef common::hash::ObPointerHashMap LobPieceNameMap; -typedef common::hash::ObPointerHashMap ForeignKeyNameMap; -typedef common::hash::ObPointerHashMap ConstraintNameMap; +typedef common::hash::ObPointerHashMap DatabaseNameMap; +typedef common::hash::ObPointerHashMap TableIdMap; +typedef common::hash::ObPointerHashMap DatabaseIdMap; +typedef common::hash::ObPointerHashMap TableNameMap; +typedef common::hash::ObPointerHashMap IndexNameMap; +typedef common::hash::ObPointerHashMap AuxVPNameMap; +typedef common::hash::ObPointerHashMap LobMetaNameMap; +typedef common::hash::ObPointerHashMap LobPieceNameMap; +typedef common::hash::ObPointerHashMap ForeignKeyNameMap; +typedef common::hash::ObPointerHashMap ConstraintNameMap; public: ObSchemaMgr(); explicit ObSchemaMgr(common::ObIAllocator &allocator); diff --git a/src/share/schema/ob_security_audit_mgr.h b/src/share/schema/ob_security_audit_mgr.h index e8300fe7bf..af81e31b06 100644 --- a/src/share/schema/ob_security_audit_mgr.h +++ b/src/share/schema/ob_security_audit_mgr.h @@ -108,7 +108,7 @@ class ObSAuditMgr public: typedef common::ObSortedVector AuditInfos; typedef common::hash::ObPointerHashMap ObAuditMap; + ObGetAuditKey, 128> ObAuditMap; typedef AuditInfos::iterator AuditIter; typedef AuditInfos::const_iterator ConstAuditIter; ObSAuditMgr(); diff --git a/src/share/schema/ob_sequence_mgr.h b/src/share/schema/ob_sequence_mgr.h index 34579925ea..304d3a3bc7 100644 --- a/src/share/schema/ob_sequence_mgr.h +++ b/src/share/schema/ob_sequence_mgr.h @@ -93,7 +93,7 @@ class ObSequenceMgr public: typedef common::ObSortedVector SequenceInfos; typedef common::hash::ObPointerHashMap ObSequenceMap; + ObGetSequenceKey, 128> ObSequenceMap; typedef SequenceInfos::iterator SequenceIter; typedef SequenceInfos::const_iterator ConstSequenceIter; ObSequenceMgr(); diff --git a/src/share/schema/ob_synonym_mgr.h b/src/share/schema/ob_synonym_mgr.h index dbe33791d4..469f28609f 100644 --- a/src/share/schema/ob_synonym_mgr.h +++ b/src/share/schema/ob_synonym_mgr.h @@ -163,9 +163,9 @@ class ObSynonymMgr public: typedef common::ObSortedVector SynonymInfos; typedef common::hash::ObPointerHashMap ObSynonymIdMap; + ObGetSynonymKey, 128> ObSynonymIdMap; typedef common::hash::ObPointerHashMap ObSynonymNameMap; + ObGetSynonymKey, 128> ObSynonymNameMap; typedef SynonymInfos::iterator SynonymIter; typedef SynonymInfos::const_iterator ConstSynonymIter; ObSynonymMgr(); diff --git a/src/share/schema/ob_sys_variable_mgr.h b/src/share/schema/ob_sys_variable_mgr.h index 2188c307fb..aa568b7c7b 100644 --- a/src/share/schema/ob_sys_variable_mgr.h +++ b/src/share/schema/ob_sys_variable_mgr.h @@ -107,7 +107,7 @@ class ObSysVariableMgr { public: typedef common::ObSortedVector SysVariableInfos; - typedef common::hash::ObPointerHashMap ObSysVariableMap; + typedef common::hash::ObPointerHashMap ObSysVariableMap; typedef SysVariableInfos::iterator SysVariableIter; typedef SysVariableInfos::const_iterator ConstSysVariableIter; ObSysVariableMgr(); diff --git a/src/share/schema/ob_tablespace_mgr.h b/src/share/schema/ob_tablespace_mgr.h index 773fb30902..6516e0f721 100644 --- a/src/share/schema/ob_tablespace_mgr.h +++ b/src/share/schema/ob_tablespace_mgr.h @@ -92,7 +92,7 @@ class ObTablespaceMgr public: typedef common::ObSortedVector TablespaceInfos; typedef common::hash::ObPointerHashMap ObTablespaceMap; + ObGetTablespaceKey, 128> ObTablespaceMap; typedef TablespaceInfos::iterator TablespaceIter; typedef TablespaceInfos::const_iterator ConstTablespaceIter; ObTablespaceMgr(); diff --git a/src/share/schema/ob_trigger_mgr.h b/src/share/schema/ob_trigger_mgr.h index e15c8b1b2a..76f08a09dc 100644 --- a/src/share/schema/ob_trigger_mgr.h +++ b/src/share/schema/ob_trigger_mgr.h @@ -236,9 +236,9 @@ class ObTriggerMgr { typedef common::ObSortedVector TriggerInfos; typedef common::hash::ObPointerHashMap TriggerIdMap; + ObGetTriggerKey, 128> TriggerIdMap; typedef common::hash::ObPointerHashMap TriggerNameMap; + ObGetTriggerKey, 128> TriggerNameMap; typedef TriggerInfos::iterator TriggerIter; typedef TriggerInfos::const_iterator ConstTriggerIter; public: diff --git a/src/share/schema/ob_udf_mgr.h b/src/share/schema/ob_udf_mgr.h index c3bfe55936..4cf73bf0e9 100644 --- a/src/share/schema/ob_udf_mgr.h +++ b/src/share/schema/ob_udf_mgr.h @@ -143,7 +143,7 @@ class ObUDFMgr { public: typedef common::ObSortedVector UDFInfos; - typedef common::hash::ObPointerHashMap ObUDFMap; + typedef common::hash::ObPointerHashMap ObUDFMap; typedef UDFInfos::iterator UDFIter; typedef UDFInfos::const_iterator ConstUDFIter; ObUDFMgr(); diff --git a/src/share/schema/ob_udt_mgr.h b/src/share/schema/ob_udt_mgr.h index 389dd64f1a..37a4588da8 100644 --- a/src/share/schema/ob_udt_mgr.h +++ b/src/share/schema/ob_udt_mgr.h @@ -237,9 +237,9 @@ class ObUDTMgr { typedef common::ObSortedVector UDTInfos; typedef common::hash::ObPointerHashMap UDTIdMap; + ObGetUDTKey, 512> UDTIdMap; typedef common::hash::ObPointerHashMap UDTNameMap; + ObGetUDTKey, 512> UDTNameMap; typedef UDTInfos::iterator UDTIter; typedef UDTInfos::const_iterator ConstUDTIter; public: