This is an automated email from the ASF dual-hosted git repository.

kangkaisen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 725ee59  Fix mysqlslap hang under high concurrent (#4680)
725ee59 is described below

commit 725ee59824a8395822774bca56bb32f2e408b454
Author: kangkaisen <kangkai...@apache.org>
AuthorDate: Wed Oct 7 12:30:18 2020 +0800

    Fix mysqlslap hang under high concurrent (#4680)
---
 docs/en/administrator-guide/config/fe_config.md               |  8 ++++++++
 docs/zh-CN/administrator-guide/config/fe_config.md            |  6 ++++++
 fe/fe-core/src/main/java/org/apache/doris/common/Config.java  | 11 +++++++++--
 .../main/java/org/apache/doris/mysql/nio/NMysqlServer.java    |  2 +-
 4 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/docs/en/administrator-guide/config/fe_config.md 
b/docs/en/administrator-guide/config/fe_config.md
index 3ec6301..8b18254 100644
--- a/docs/en/administrator-guide/config/fe_config.md
+++ b/docs/en/administrator-guide/config/fe_config.md
@@ -334,6 +334,14 @@ This variable is a dynamic configuration, and users can 
modify the configuration
 
 ### `http_backlog_num`
 
+The backlog_num for netty http server, When you enlarge this backlog_num,
+you should enlarge the value in the linux /proc/sys/net/core/somaxconn file at 
the same time
+
+### `mysql_nio_backlog_num`
+
+The backlog_num for mysql nio server, When you enlarge this backlog_num,
+you should enlarge the value in the linux /proc/sys/net/core/somaxconn file at 
the same time
+
 ### `http_port`
 
 HTTP bind port. Defaults to 8030.
diff --git a/docs/zh-CN/administrator-guide/config/fe_config.md 
b/docs/zh-CN/administrator-guide/config/fe_config.md
index 8898a3f..0eb2248 100644
--- a/docs/zh-CN/administrator-guide/config/fe_config.md
+++ b/docs/zh-CN/administrator-guide/config/fe_config.md
@@ -331,6 +331,12 @@ FE 的配置项有两种方式进行配置:
 ### `history_job_keep_max_second`
 
 ### `http_backlog_num`
+Doris netty http server 的backlog_num 参数,当你增大该配置时,也需要同时
+增大 Linux /proc/sys/net/core/somaxconn 文件的值 
+
+### `mysql_nio_backlog_num`
+Doris mysql nio server 的backlog_num 参数,当你增大该配置时,也需要同时
+增大 Linux /proc/sys/net/core/somaxconn 文件的值 
 
 ### `http_port`
 
diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/Config.java 
b/fe/fe-core/src/main/java/org/apache/doris/common/Config.java
index fb8271a..0b06738 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/common/Config.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/common/Config.java
@@ -296,12 +296,19 @@ public class Config extends ConfigBase {
 
     /**
      * The backlog_num for netty http server
-     * When you enlarge this backlog_num, you should ensure it's value larger 
than
-     * the linux /proc/sys/net/core/somaxconn config
+     * When you enlarge this backlog_num, you should enlarge the value in
+     * the linux /proc/sys/net/core/somaxconn file at the same time
      */
     @ConfField public static int http_backlog_num = 1024;
 
     /**
+     * The backlog_num for mysql nio server
+     * When you enlarge this backlog_num, you should enlarge the value in
+     * the linux /proc/sys/net/core/somaxconn file at the same time
+     */
+    @ConfField public static int mysql_nio_backlog_num = 1024;
+
+    /**
      * The connection timeout and socket timeout config for thrift server
      * The value for thrift_client_timeout_ms is set to be larger than zero to 
prevent
      * some hang up problems in java.net.SocketInputStream.socketRead0
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/mysql/nio/NMysqlServer.java 
b/fe/fe-core/src/main/java/org/apache/doris/mysql/nio/NMysqlServer.java
index 964abaa..e55ae84 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/mysql/nio/NMysqlServer.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/mysql/nio/NMysqlServer.java
@@ -64,7 +64,7 @@ public class NMysqlServer extends MysqlServer {
     public boolean start() {
         try {
             server = xnioWorker.createStreamConnectionServer(new 
InetSocketAddress(port),
-                    acceptListener, OptionMap.create(Options.TCP_NODELAY, 
true));
+                    acceptListener, OptionMap.create(Options.TCP_NODELAY, 
true, Options.BACKLOG, Config.mysql_nio_backlog_num));
             server.resumeAccepts();
             running = true;
             LOG.info("Open mysql server success on {}", port);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to