mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-04 04:12:55 +00:00
feat: support server-side keep-alive for mysql and pg protocols (#5496)
* feat: support server-side keep-alive for mysql and pg protocols Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * update config.md Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * update config to use humantime for keep-alive configuration Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * chore: Update socket2 dependency Signed-off-by: Ruihang Xia <waynestxia@gmail.com> --------- Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
@@ -589,6 +589,7 @@ pub async fn setup_mysql_server_with_user_provider(
|
||||
ReloadableTlsServerConfig::try_new(opts.tls.clone())
|
||||
.expect("Failed to load certificates and keys"),
|
||||
),
|
||||
0,
|
||||
opts.reject_no_database.unwrap_or(false),
|
||||
)),
|
||||
));
|
||||
@@ -641,6 +642,7 @@ pub async fn setup_pg_server_with_user_provider(
|
||||
ServerSqlQueryHandlerAdapter::arc(fe_instance_ref),
|
||||
opts.tls.should_force_tls(),
|
||||
tls_server_config,
|
||||
0,
|
||||
runtime,
|
||||
user_provider,
|
||||
)) as Box<dyn Server>);
|
||||
|
||||
@@ -923,6 +923,7 @@ watch = false
|
||||
enable = true
|
||||
addr = "127.0.0.1:4002"
|
||||
runtime_size = 2
|
||||
keep_alive = "0s"
|
||||
|
||||
[mysql.tls]
|
||||
mode = "disable"
|
||||
@@ -934,6 +935,7 @@ watch = false
|
||||
enable = true
|
||||
addr = "127.0.0.1:4003"
|
||||
runtime_size = 2
|
||||
keep_alive = "0s"
|
||||
|
||||
[postgres.tls]
|
||||
mode = "disable"
|
||||
|
||||
Reference in New Issue
Block a user