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

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new c1245a14aad branch-3.0: [chore](file cache) Disable show cache hotspot 
stmt #47332 (#47713)
c1245a14aad is described below

commit c1245a14aadd3994f10b8d6bc4c0fad290529f60
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Feb 11 10:43:50 2025 +0800

    branch-3.0: [chore](file cache) Disable show cache hotspot stmt #47332 
(#47713)
    
    Cherry-picked from #47332
    
    Co-authored-by: Gavin Chou <ga...@selectdb.com>
---
 fe/fe-common/src/main/java/org/apache/doris/common/Config.java       | 4 ++++
 .../main/java/org/apache/doris/analysis/ShowCacheHotSpotStmt.java    | 5 +++++
 2 files changed, 9 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 a7e781dd2a4..46a1b8540a1 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
@@ -3233,6 +3233,10 @@ public class Config extends ConfigBase {
             "Max retry times when schema change failed in cloud model, default 
is 3."})
     public static int schema_change_max_retry_time = 3;
 
+    @ConfField(mutable = true, description = {"是否允许使用ShowCacheHotSpotStmt语句",
+            "Whether to enable the use of ShowCacheHotSpotStmt, default is 
false."})
+    public static boolean enable_show_file_cache_hotspot_stmt = false;
+
     // ATTN: DONOT add any config not related to cloud mode here
     // ATTN: DONOT add any config not related to cloud mode here
     // ATTN: DONOT add any config not related to cloud mode here
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowCacheHotSpotStmt.java 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowCacheHotSpotStmt.java
index cf978033d79..c6dc1fe4d7a 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowCacheHotSpotStmt.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowCacheHotSpotStmt.java
@@ -113,6 +113,11 @@ public class ShowCacheHotSpotStmt extends ShowStmt 
implements NotFallbackInParse
             whereExpr.add(String.format("%s = '%s' ", whereExprVariables.get(i 
- 1), whereExprValues.get(i)));
         }
         metaDataPos = whereExpr.size();
+        if (!Config.enable_show_file_cache_hotspot_stmt) {
+            LOG.info("show cache hotspot stmt is deprecated, use select stmt 
instead: " + generateQueryString());
+            throw new UserException("show cache hotspot stmt is deprecated, 
please use select stmt instead: "
+                    + generateQueryString());
+        }
     }
 
     @Override


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

Reply via email to