reserve more memory to receive mysql packets in case of out of tenant memory

This commit is contained in:
hnwyllmm
2024-02-27 09:50:22 +00:00
committed by ob-robot
parent fd54ded76c
commit a4d4ce1b69
2 changed files with 3 additions and 2 deletions

View File

@ -261,7 +261,6 @@ int ObRandomOSSReader::get_file_size(int64_t &file_size)
/**
* ObPacketStreamFileReader
*/
class CSMemPoolAdaptor : public obmysql::ObICSMemPool
{
public:
@ -285,7 +284,8 @@ ObPacketStreamFileReader::ObPacketStreamFileReader(ObIAllocator &allocator)
packet_handle_(NULL),
session_(NULL),
timeout_ts_(INT64_MAX),
arena_allocator_(allocator),
// OB_MALLOC_MIDDLE_BLOCK_SIZE 64K. one mysql packet is about 16K
arena_allocator_(allocator, OB_MALLOC_MIDDLE_BLOCK_SIZE),
cached_packet_(NULL),
received_size_(0),
read_size_(0),

View File

@ -191,6 +191,7 @@ private:
// As we read a packet from client, the NIO store the data into the NIO buffer
// and allocate an ObPacket by an allocator(arena_allocator_). The ObPacket(cached_packet_)
// is cached in the memory of allocator.
// NOTE: arena_allocator only ccache the size is smaller than it's page_size(8K,16K, etc)
ObArenaAllocator arena_allocator_;
obmysql::ObMySQLRawPacket *cached_packet_;