This is an automated email from the ASF dual-hosted git repository. zykkk pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push: new 3f382b797ad [branch-2.1][improvement](sqlserver catalog) Configurable whether to use encrypt when connecting to SQL Server using the catalog (#36971) 3f382b797ad is described below commit 3f382b797ad0bcf05fdaf0e38d130f803eb04cc3 Author: zy-kkk <zhongy...@gmail.com> AuthorDate: Tue Jul 2 10:14:43 2024 +0800 [branch-2.1][improvement](sqlserver catalog) Configurable whether to use encrypt when connecting to SQL Server using the catalog (#36971) pick (#36659) pick #37015 In previous versions, we used druid as the default JDBC connection pool, which can use custom decryption to parse the certificate when SQL Server encryption is turned on. However, in the new version, after changing HikariCP as the default connection pool, the SQLServer certificate cannot be parsed, so encryption needs to be turned off for normal use. Therefore, a parameter is added to decide whether to disable SQLServer encryption. It is not disabled by default. --- fe/fe-common/src/main/java/org/apache/doris/common/Config.java | 4 ++++ fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcResource.java | 3 +++ 2 files changed, 7 insertions(+) diff --git a/fe/fe-common/src/main/java/org/apache/doris/common/Config.java b/fe/fe-common/src/main/java/org/apache/doris/common/Config.java index e1b29b7f849..b51ab170f02 100644 --- a/fe/fe-common/src/main/java/org/apache/doris/common/Config.java +++ b/fe/fe-common/src/main/java/org/apache/doris/common/Config.java @@ -162,6 +162,10 @@ public class Config extends ConfigBase { "MySQL Jdbc Catalog mysql does not support pushdown functions"}) public static String[] jdbc_mysql_unsupported_pushdown_functions = {"date_trunc", "money_format", "negative"}; + @ConfField(description = {"强制 SQLServer Jdbc Catalog 加密为 false", + "Force SQLServer Jdbc Catalog encrypt to false"}) + public static boolean force_sqlserver_jdbc_encrypt_false = false; + @ConfField(mutable = true, masterOnly = true, description = {"broker load 时,单个节点上 load 执行计划的默认并行度", "The default parallelism of the load execution plan on a single node when the broker load is submitted"}) public static int default_load_parallelism = 8; diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcResource.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcResource.java index e8498d0a2d7..bd14740a6f8 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcResource.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcResource.java @@ -353,6 +353,9 @@ public class JdbcResource extends Resource { newJdbcUrl = checkAndSetJdbcBoolParam(dbType, newJdbcUrl, "reWriteBatchedInserts", "false", "true"); } if (dbType.equals(SQLSERVER)) { + if (Config.force_sqlserver_jdbc_encrypt_false) { + newJdbcUrl = checkAndSetJdbcBoolParam(dbType, newJdbcUrl, "encrypt", "true", "false"); + } newJdbcUrl = checkAndSetJdbcBoolParam(dbType, newJdbcUrl, "useBulkCopyForBatchInsert", "false", "true"); } return newJdbcUrl; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org