You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/02/19 09:24:17 UTC
(doris) 17/18: [fix](mysql-channel) initialize mysql serializer by default (#31083)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
commit 277de979c3a46ed63035cd200b4f53c9f7f59f5a
Author: Siyang Tang <82...@users.noreply.github.com>
AuthorDate: Mon Feb 19 15:54:21 2024 +0800
[fix](mysql-channel) initialize mysql serializer by default (#31083)
---
.../src/main/java/org/apache/doris/mysql/DummyMysqlChannel.java | 3 ---
fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlChannel.java | 4 +---
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/mysql/DummyMysqlChannel.java b/fe/fe-core/src/main/java/org/apache/doris/mysql/DummyMysqlChannel.java
index 05b72552f96..4d738cb639d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/mysql/DummyMysqlChannel.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/mysql/DummyMysqlChannel.java
@@ -27,9 +27,6 @@ import java.nio.ByteBuffer;
* And don't need to allocate a real ByteBuffer.
*/
public class DummyMysqlChannel extends MysqlChannel {
- public DummyMysqlChannel() {
- this.serializer = MysqlSerializer.newInstance();
- }
public void setSequenceId(int sequenceId) {
this.sequenceId = sequenceId;
diff --git a/fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlChannel.java b/fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlChannel.java
index 5dfa7947abe..90354ae9cb7 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlChannel.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlChannel.java
@@ -75,7 +75,7 @@ public class MysqlChannel {
protected boolean isSslHandshaking;
private SSLEngine sslEngine;
- protected volatile MysqlSerializer serializer;
+ protected volatile MysqlSerializer serializer = MysqlSerializer.newInstance();
// mysql flag CLIENT_DEPRECATE_EOF
private boolean clientDeprecatedEOF;
@@ -111,8 +111,6 @@ public class MysqlChannel {
remoteHostPortString = connection.getPeerAddress().toString();
remoteIp = connection.getPeerAddress().toString();
}
- // The serializer and buffers should only be created if this is a real MysqlChannel
- this.serializer = MysqlSerializer.newInstance();
this.defaultBuffer = ByteBuffer.allocate(16 * 1024);
this.headerByteBuffer = ByteBuffer.allocate(PACKET_HEADER_LEN);
this.sendBuffer = ByteBuffer.allocate(2 * 1024 * 1024);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org