This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 05c5c5949c [refactor](FileCache) set FE session variable
enable_file_cache=false as default (#19327)
05c5c5949c is described below
commit 05c5c5949c8ba5bdf5e44ef1dc379f405e6a1ad4
Author: Ashin Gau <[email protected]>
AuthorDate: Mon May 8 13:53:51 2023 +0800
[refactor](FileCache) set FE session variable enable_file_cache=false as
default (#19327)
Users should set `enable_file_cache=true` in FE session variables and BE
configuration to enable file cache.
---
docs/en/docs/advanced/variables.md | 6 +++++-
docs/zh-CN/docs/advanced/variables.md | 6 +++++-
.../src/main/java/org/apache/doris/qe/SessionVariable.java | 13 ++++++++++---
gensrc/thrift/PaloInternalService.thrift | 2 +-
4 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/docs/en/docs/advanced/variables.md
b/docs/en/docs/advanced/variables.md
index bca47193bd..6ca725d29b 100644
--- a/docs/en/docs/advanced/variables.md
+++ b/docs/en/docs/advanced/variables.md
@@ -606,7 +606,11 @@ Translated with www.DeepL.com/Translator (free version)
* `enable_file_cache`
- Set wether to use block file cache. This variable takes effect only if the
BE config enable_file_cache=true. The cache is not used when BE config
enable_file_cache=false.
+ Set wether to use block file cache, default false. This variable takes
effect only if the BE config enable_file_cache=true. The cache is not used when
BE config enable_file_cache=false.
+
+* `file_cache_base_path`
+
+ Specify the storage path of the block file cache on BE, default 'random',
and randomly select the storage path configured by BE.
* `topn_opt_limit_threshold`
diff --git a/docs/zh-CN/docs/advanced/variables.md
b/docs/zh-CN/docs/advanced/variables.md
index 81b74850a9..1980790f5e 100644
--- a/docs/zh-CN/docs/advanced/variables.md
+++ b/docs/zh-CN/docs/advanced/variables.md
@@ -592,7 +592,11 @@ try (Connection conn =
DriverManager.getConnection("jdbc:mysql://127.0.0.1:9030/
* `enable_file_cache`
- 控制是否启用block file
cache。该变量只有在be.conf中enable_file_cache=true时才有效,如果be.conf中enable_file_cache=false,则block
file cache一直处于禁用状态。
+ 控制是否启用block file cache,默认
false。该变量只有在be.conf中enable_file_cache=true时才有效,如果be.conf中enable_file_cache=false,该BE节点的block
file cache处于禁用状态。
+
+* `file_cache_base_path`
+
+ 指定block file cache在BE上的存储路径,默认 'random',随机选择BE配置的存储路径。
* `topn_opt_limit_threshold`
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
index a04b636a7a..09e8abd396 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
@@ -802,11 +802,18 @@ public class SessionVariable implements Serializable,
Writable {
public boolean groupByAndHavingUseAliasFirst = false;
// Whether enable block file cache. Only take effect when BE config item
enable_file_cache is true.
- @VariableMgr.VarAttr(name = ENABLE_FILE_CACHE, needForward = true)
- public boolean enableFileCache = true;
+ @VariableMgr.VarAttr(name = ENABLE_FILE_CACHE, needForward = true,
description = {
+ "是否启用file cache。该变量只有在be.conf中enable_file_cache=true时才有效,"
+ + "如果be.conf中enable_file_cache=false,该BE节点的file
cache处于禁用状态。",
+ "Set wether to use file cache. This variable takes effect only if
the BE config enable_file_cache=true. "
+ + "The cache is not used when BE config
enable_file_cache=false."})
+ public boolean enableFileCache = false;
// Specify base path for file cache, or chose a random path.
- @VariableMgr.VarAttr(name = FILE_CACHE_BASE_PATH, needForward = true)
+ @VariableMgr.VarAttr(name = FILE_CACHE_BASE_PATH, needForward = true,
description = {
+ "指定block file cache在BE上的存储路径,默认 'random',随机选择BE配置的存储路径。",
+ "Specify the storage path of the block file cache on BE, default
'random', "
+ + "and randomly select the storage path configured by
BE."})
public String fileCacheBasePath = "random";
// Whether drop table when create table as select insert data appear error.
diff --git a/gensrc/thrift/PaloInternalService.thrift
b/gensrc/thrift/PaloInternalService.thrift
index 012578f25d..6afe288ee8 100644
--- a/gensrc/thrift/PaloInternalService.thrift
+++ b/gensrc/thrift/PaloInternalService.thrift
@@ -195,7 +195,7 @@ struct TQueryOptions {
// deprecated
60: optional i32 partitioned_hash_agg_rows_threshold = 0
- 61: optional bool enable_file_cache = true
+ 61: optional bool enable_file_cache = false
62: optional i32 insert_timeout = 14400
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]