[feature-wip] (memory tracker) (step6, End) Fix some details (#9301)

1. Fix LoadTask, ChunkAllocator, TabletMeta, Brpc, the accuracy of memory track.
2. Modified some MemTracker names, deleted some unnecessary trackers, and improved readability.
3. More powerful MemTracker debugging capabilities.
4. Avoid creating TabletColumn temporary objects and improve BE startup time by 8%.
5. Fix some other details.
This commit is contained in:
Xinyi Zou
2022-05-10 18:17:09 +08:00
committed by GitHub
parent 99b8e08a5f
commit b34ed43ec9
35 changed files with 170 additions and 123 deletions

View File

@ -221,7 +221,9 @@ void MemPool::acquire_data(MemPool* src, bool keep_current) {
void MemPool::exchange_data(MemPool* other) {
int64_t delta_size = other->total_reserved_bytes_ - total_reserved_bytes_;
other->_mem_tracker->transfer_to(_mem_tracker, delta_size);
if (other->_mem_tracker != _mem_tracker) {
other->_mem_tracker->transfer_to(_mem_tracker, delta_size);
}
std::swap(current_chunk_idx_, other->current_chunk_idx_);
std::swap(next_chunk_size_, other->next_chunk_size_);