Split encoding mem mode to relative tenant.
This commit is contained in:
		| @ -25,7 +25,7 @@ using namespace common; | ||||
|  | ||||
| ObEncodingHashTable::ObEncodingHashTable() : is_created_(false), bucket_num_(0), | ||||
|     node_num_(0), list_num_(0), node_cnt_(0), list_cnt_(0), buckets_(NULL), nodes_(NULL), | ||||
|     lists_(NULL), alloc_(blocksstable::OB_ENCODING_LABEL_HASH_TABLE) | ||||
|     lists_(NULL), alloc_(blocksstable::OB_ENCODING_LABEL_HASH_TABLE, OB_MALLOC_NORMAL_BLOCK_SIZE, MTL_ID()) | ||||
| { | ||||
|   MEMSET(&null_nodes_, 0, sizeof(null_nodes_)); | ||||
|   MEMSET(&nope_nodes_, 0, sizeof(nope_nodes_)); | ||||
| @ -226,6 +226,8 @@ ObEncodingHashTableFactory::ObEncodingHashTableFactory() | ||||
|   : allocator_(OB_MALLOC_NORMAL_BLOCK_SIZE, ObMalloc(blocksstable::OB_ENCODING_LABEL_HT_FACTORY)), | ||||
|     hashtables_() | ||||
| { | ||||
|   lib::ObMemAttr attr(MTL_ID(), blocksstable::OB_ENCODING_LABEL_HT_FACTORY); | ||||
|   allocator_.set_attr(attr); | ||||
| } | ||||
|  | ||||
| ObEncodingHashTableFactory::~ObEncodingHashTableFactory() | ||||
|  | ||||
| @ -18,6 +18,7 @@ | ||||
| #include "common/object/ob_object.h" | ||||
| #include "common/ob_action_flag.h" | ||||
| #include "storage/blocksstable/ob_datum_row.h" | ||||
| #include "share/rc/ob_tenant_base.h" | ||||
|  | ||||
| namespace oceanbase | ||||
| { | ||||
| @ -603,8 +604,7 @@ private: | ||||
|       ret = common::OB_SIZE_OVERFLOW; | ||||
|       STORAGE_LOG(WARN, "size will overflow", K(ret), K_(size), K(block_cnt), K(cur_cnt)); | ||||
|     } else { | ||||
|       common::ObMemAttr ma; | ||||
|       ma.label_ = blocksstable::OB_ENCODING_LABEL_PIVOT; | ||||
|       common::ObMemAttr ma(MTL_ID(), blocksstable::OB_ENCODING_LABEL_PIVOT); | ||||
|       for (int64_t i = 0; i < block_cnt && OB_SUCC(ret); ++i) { | ||||
|         if (NULL == block_list_[cur_cnt + i]) { | ||||
|           T *block = static_cast<T *>(common::ob_malloc(BLOCK_SIZE, ma)); | ||||
|  | ||||
| @ -306,14 +306,15 @@ int ObMicroBlockEncoder::init_all_col_values(const ObMicroBlockEncodingCtx &ctx) | ||||
|   if (OB_FAIL(all_col_datums_.reserve(ctx.column_cnt_))) { | ||||
|     LOG_WARN("reserve array failed", K(ret), "size", ctx.column_cnt_); | ||||
|   } | ||||
|   lib::ObMemAttr attr(MTL_ID(), blocksstable::OB_ENCODING_LABEL_PIVOT); | ||||
|   for (int64_t i = all_col_datums_.count(); i < ctx.column_cnt_ && OB_SUCC(ret); ++i) { | ||||
|     ObColDatums *c = OB_NEW(ObColDatums, blocksstable::OB_ENCODING_LABEL_PIVOT); | ||||
|     ObColDatums *c = OB_NEW(ObColDatums, attr); | ||||
|     if (OB_ISNULL(c)) { | ||||
|       ret = OB_ALLOCATE_MEMORY_FAILED; | ||||
|       LOG_WARN("alloc memory failed", K(ret), K(ctx)); | ||||
|     } else if (OB_FAIL(all_col_datums_.push_back(c))) { | ||||
|       LOG_WARN("push back column values failed", K(ret)); | ||||
|       OB_DELETE(ObColDatums, blocksstable::OB_ENCODING_LABEL_PIVOT, c); | ||||
|       OB_DELETE(ObColDatums, attr, c); | ||||
|     } | ||||
|   } | ||||
|   return ret; | ||||
|  | ||||
| @ -123,7 +123,7 @@ int ObMultiPrefixTree::HashTable::build(TreeNode &tnode, const int64_t move_step | ||||
|  *  ObMultiPrefixTree | ||||
|  */ | ||||
| ObMultiPrefixTree::ObMultiPrefixTree() : is_inited_(false), | ||||
|     alloc_(blocksstable::OB_ENCODING_LABEL_MULTI_PREFIX_TREE), | ||||
|     alloc_(blocksstable::OB_ENCODING_LABEL_MULTI_PREFIX_TREE, OB_MALLOC_NORMAL_BLOCK_SIZE, MTL_ID()), | ||||
|     tree_nodes_(NULL), cell_nodes_(NULL), | ||||
|     tnode_cnt_(0), cnode_cnt_(0), cnode_cnt_limit_(0), ht_(), | ||||
|     null_cnt_(0), nope_cnt_(0) | ||||
| @ -458,6 +458,8 @@ ObMultiPrefixTreeFactory::ObMultiPrefixTreeFactory() | ||||
|     : allocator_(OB_MALLOC_NORMAL_BLOCK_SIZE, ObMalloc(blocksstable::OB_ENCODING_LABEL_PREFIX_TREE_FACTORY)), | ||||
|       prefix_trees_() | ||||
| { | ||||
|   lib::ObMemAttr attr(MTL_ID(), blocksstable::OB_ENCODING_LABEL_PREFIX_TREE_FACTORY); | ||||
|   allocator_.set_attr(attr); | ||||
| } | ||||
|  | ||||
| ObMultiPrefixTreeFactory::~ObMultiPrefixTreeFactory() | ||||
|  | ||||
| @ -32,7 +32,7 @@ ObStringDiffEncoder::ObStringDiffEncoder() | ||||
|     : string_size_(0), common_size_(0), row_store_size_(0), | ||||
|     null_cnt_(0), nope_cnt_(0), first_string_(NULL), | ||||
|     header_(NULL), last_change_diff_row_id_(0), | ||||
|     allocator_(blocksstable::OB_ENCODING_LABEL_STRING_DIFF) | ||||
|     allocator_(blocksstable::OB_ENCODING_LABEL_STRING_DIFF, OB_MALLOC_NORMAL_BLOCK_SIZE, MTL_ID()) | ||||
| { | ||||
| } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 obdev
					obdev