Fix a batch of memory not being split to tenant
This commit is contained in:
3
deps/oblib/src/lib/queue/ob_dedup_queue.cpp
vendored
3
deps/oblib/src/lib/queue/ob_dedup_queue.cpp
vendored
@ -45,6 +45,7 @@ ObDedupQueue::ObDedupQueue() : is_inited_(false),
|
||||
work_thread_num_(DEFAULT_THREAD_NUM),
|
||||
thread_dead_threshold_(DEFALT_THREAD_DEAD_THRESHOLD),
|
||||
hash_allocator_(allocator_),
|
||||
bucket_allocator_(&allocator_),
|
||||
gc_queue_head_(NULL),
|
||||
gc_queue_tail_(NULL),
|
||||
thread_name_(nullptr)
|
||||
@ -89,7 +90,7 @@ int ObDedupQueue::init(const int64_t thread_num /*= DEFAULT_THREAD_NUM*/,
|
||||
COMMON_LOG(WARN, "allocator init fail", K(page_size), K(label), K(tenant_id),
|
||||
K(total_mem_limit), K(ret));
|
||||
} else if (OB_SUCCESS != (ret = task_map_.create(task_map_size, &hash_allocator_,
|
||||
ObModIds::OB_HASH_BUCKET_TASK_MAP))) {
|
||||
&bucket_allocator_))) {
|
||||
COMMON_LOG(WARN, "task_map create fail", K(ret));
|
||||
} else if (OB_SUCCESS != (ret = task_queue_.init(queue_size, &allocator_))) {
|
||||
COMMON_LOG(WARN, "task_queue init fail", K(ret));
|
||||
|
||||
5
deps/oblib/src/lib/queue/ob_dedup_queue.h
vendored
5
deps/oblib/src/lib/queue/ob_dedup_queue.h
vendored
@ -189,7 +189,9 @@ private:
|
||||
hash::MultiWriteDefendMode,
|
||||
hash::hash_func<const IObDedupTask *>,
|
||||
hash::equal_to<const IObDedupTask *>,
|
||||
HashAllocator> TaskMap;
|
||||
HashAllocator,
|
||||
common::hash::NormalPointer,
|
||||
common::ObWrapperAllocator> TaskMap;
|
||||
typedef hash::HashMapTypes<const IObDedupTask *, IObDedupTask *>::pair_type TaskMapKVPair;
|
||||
static const int32_t DEFAULT_THREAD_NUM = 4;
|
||||
static const int32_t MAX_THREAD_NUM = 64;
|
||||
@ -301,6 +303,7 @@ private:
|
||||
int64_t thread_dead_threshold_;
|
||||
ObConcurrentFIFOAllocator allocator_;
|
||||
HashAllocator hash_allocator_;
|
||||
common::ObWrapperAllocator bucket_allocator_;
|
||||
TaskMap task_map_;
|
||||
TaskQueue task_queue_;
|
||||
ObThreadCond task_queue_sync_;
|
||||
|
||||
Reference in New Issue
Block a user