morningman commented on code in PR #17138:
URL: https://github.com/apache/doris/pull/17138#discussion_r1122031141
##########
fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlChannel.java:
##########
@@ -86,6 +103,15 @@ public MysqlChannel(StreamConnection connection) {
this.sendBuffer = ByteBuffer.allocate(2 * 1024 * 1024);
}
+ public void initSslBuffer() {
+ // allocate buffer when needed.
+ this.sendSslBuffer = ByteBuffer.allocate(2 * 1024 * 1024);
+ this.remainingBuffer = ByteBuffer.allocate(16 * 1024);
+ this.remainingBuffer.flip();
+ this.tempBuffer = ByteBuffer.allocate(16 * 1024);
+ this.sslHeaderByteBuffer = ByteBuffer.allocate(SSL_PACKET_HEADER_LEN);
Review Comment:
We should release the `sendBuffer` to save memory, otherwise for each
security connection, there is 2MB + 2MB buffer
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]