You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/08/03 08:36:17 UTC

[GitHub] [incubator-doris] wutiangan commented on a change in pull request #4222: [Spill To Disk][4/6] Partition Aggregation Node Support Spill to disk in big query

wutiangan commented on a change in pull request #4222:
URL: https://github.com/apache/incubator-doris/pull/4222#discussion_r464271076



##########
File path: be/src/exec/partitioned_hash_table.cc
##########
@@ -520,17 +543,26 @@ Status PartitionedHashTable::ResizeBuckets(
   }
 
   num_buckets_ = num_buckets;
-  allocator_->Free(move(bucket_allocation_));
+  auto free_bytes = allocator_->Free(move(bucket_allocation_));
+  state_->block_mgr2()->release_memory(block_mgr_client_, free_bytes);
+
   bucket_allocation_ = std::move(new_allocation);
   buckets_ = reinterpret_cast<Bucket*>(bucket_allocation_->data());
   *got_memory = true;
   return Status::OK();
 }
 
 bool PartitionedHashTable::GrowNodeArray(Status* status) {
+  auto allocate_bytes = allocator_->ComputeAllocateBufferSize(DATA_PAGE_SIZE);
+  if (!state_->block_mgr2()->consume_memory(block_mgr_client_, allocate_bytes)) {
+     return false;

Review comment:
       3 space?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org