Fix storage ha reader using 500 tenant memory.

This commit is contained in:
godyangfight
2024-08-14 08:47:49 +00:00
committed by ob-robot
parent 0881d89dd1
commit c4dea4a3d8

View File

@ -187,11 +187,13 @@ ObCopyMacroBlockObReader::ObCopyMacroBlockObReader()
data_buffer_(),
rpc_buffer_(),
rpc_buffer_parse_pos_(0),
allocator_("CMBObReader"),
allocator_(),
macro_block_mem_context_(),
last_send_time_(0),
data_size_(0)
{
ObMemAttr attr(MTL_ID(), "CMBObReader");
allocator_.set_attr(attr);
}
ObCopyMacroBlockObReader::~ObCopyMacroBlockObReader()
@ -624,16 +626,20 @@ ObCopyMacroBlockObProducer::ObCopyMacroBlockObProducer()
macro_idx_(0),
handle_idx_(0),
prefetch_meta_time_(0),
tablet_allocator_("HaTabletHdl"),
tablet_allocator_(),
tablet_handle_(),
sstable_handle_(),
sstable_(nullptr),
datum_range_(),
allocator_("CopyMacroBlock"),
allocator_(),
second_meta_iterator_(),
io_allocator_("CMBP_IOUB", OB_MALLOC_NORMAL_BLOCK_SIZE, MTL_ID()),
meta_row_buf_("CopyMacroMetaRow")
{
ObMemAttr attr_tablet_alloc(MTL_ID(), "HaTabletHdl");
tablet_allocator_.set_attr(attr_tablet_alloc);
ObMemAttr attr_copy_macro_block(MTL_ID(), "CopyMacroBlock");
allocator_.set_attr(attr_copy_macro_block);
}
ObCopyMacroBlockObProducer::~ObCopyMacroBlockObProducer()
@ -1172,11 +1178,13 @@ int ObCopyTabletInfoObProducer::get_next_tablet_info(obrpc::ObCopyTabletInfo &ta
ObCopySSTableInfoObReader::ObCopySSTableInfoObReader()
: is_inited_(false),
rpc_reader_(),
allocator_("CSSTObReader"),
allocator_(),
is_sstable_iter_end_(true),
sstable_index_(0),
sstable_count_(0)
{
ObMemAttr attr(MTL_ID(), "CSSTObReader");
allocator_.set_attr(attr);
}
int ObCopySSTableInfoObReader::init(
@ -1292,11 +1300,13 @@ ObCopySSTableInfoRestoreReader::ObCopySSTableInfoRestoreReader()
sstable_index_(0),
is_sstable_iter_end_(true),
backup_sstable_meta_array_(),
allocator_("CSSTREReader"),
allocator_(),
ls_id_(),
ls_handle_(),
remote_sstable_producer_()
{
ObMemAttr attr(MTL_ID(), "CSSTREReader");
allocator_.set_attr(attr);
}
int ObCopySSTableInfoRestoreReader::init(
@ -2173,8 +2183,10 @@ int ObCopySSTableInfoObProducer::fake_deleted_tablet_meta_(
ObCopySSTableMacroObReader::ObCopySSTableMacroObReader()
: is_inited_(false),
rpc_reader_(),
allocator_("CSSTMBObReader")
allocator_()
{
ObMemAttr attr(MTL_ID(), "CSSTMBObReader");
allocator_.set_attr(attr);
}
int ObCopySSTableMacroObReader::init(
@ -2637,9 +2649,11 @@ ObCopySSTableMacroRangeObProducer::ObCopySSTableMacroRangeObProducer()
table_handle_(),
tablet_handle_(),
datum_range_(),
allocator_("CopySSTMacro"),
allocator_(),
second_meta_iterator_()
{
ObMemAttr attr(MTL_ID(), "CopySSTMacro");
allocator_.set_attr(attr);
}
int ObCopySSTableMacroRangeObProducer::init(
@ -2770,8 +2784,10 @@ int ObCopySSTableMacroRangeObProducer::get_next_macro_range_info(
ObCopyLSViewInfoObReader::ObCopyLSViewInfoObReader()
: is_inited_(false),
rpc_reader_(),
allocator_("CPLSVObReader")
allocator_()
{
ObMemAttr attr(MTL_ID(), "CPLSVObReader");
allocator_.set_attr(attr);
}
int ObCopyLSViewInfoObReader::init(