reserve more memory to receive mysql packets in case of out of tenant memory
This commit is contained in:
@ -261,7 +261,6 @@ int ObRandomOSSReader::get_file_size(int64_t &file_size)
|
|||||||
/**
|
/**
|
||||||
* ObPacketStreamFileReader
|
* ObPacketStreamFileReader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class CSMemPoolAdaptor : public obmysql::ObICSMemPool
|
class CSMemPoolAdaptor : public obmysql::ObICSMemPool
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -285,7 +284,8 @@ ObPacketStreamFileReader::ObPacketStreamFileReader(ObIAllocator &allocator)
|
|||||||
packet_handle_(NULL),
|
packet_handle_(NULL),
|
||||||
session_(NULL),
|
session_(NULL),
|
||||||
timeout_ts_(INT64_MAX),
|
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),
|
cached_packet_(NULL),
|
||||||
received_size_(0),
|
received_size_(0),
|
||||||
read_size_(0),
|
read_size_(0),
|
||||||
|
|||||||
@ -191,6 +191,7 @@ private:
|
|||||||
// As we read a packet from client, the NIO store the data into the NIO buffer
|
// 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_)
|
// and allocate an ObPacket by an allocator(arena_allocator_). The ObPacket(cached_packet_)
|
||||||
// is cached in the memory of allocator.
|
// 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_;
|
ObArenaAllocator arena_allocator_;
|
||||||
obmysql::ObMySQLRawPacket *cached_packet_;
|
obmysql::ObMySQLRawPacket *cached_packet_;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user