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

lijibing 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 345cc9172fa [improvement](statistics)Drop table stats in 
unprotectDropTable so that dropDB could call it as well. (#39685) (#41801)
345cc9172fa is described below

commit 345cc9172fa7d49e9c87c804d4579bdd926bd23c
Author: Jibing-Li <64681310+jibing...@users.noreply.github.com>
AuthorDate: Mon Oct 14 19:30:49 2024 +0800

    [improvement](statistics)Drop table stats in unprotectDropTable so that 
dropDB could call it as well. (#39685) (#41801)
    
    backport: https://github.com/apache/doris/pull/39685
---
 .../src/main/java/org/apache/doris/datasource/InternalCatalog.java  | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java 
b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
index 230784218af..34475596c35 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
@@ -972,9 +972,6 @@ public class InternalCatalog implements CatalogIf<Database> 
{
 
         
Env.getCurrentEnv().getQueryStats().clear(Env.getCurrentEnv().getCurrentCatalog().getId(),
                 db.getId(), table.getId());
-
-        
Env.getCurrentEnv().getAnalysisManager().removeTableStats(table.getId());
-
         DropInfo info = new DropInfo(db.getId(), table.getId(), tableName, 
-1L, forceDrop, recycleTime);
         Env.getCurrentEnv().getEditLog().logDropTable(info);
         Env.getCurrentEnv().getMtmvService().dropTable(table);
@@ -1004,7 +1001,7 @@ public class InternalCatalog implements 
CatalogIf<Database> {
         if (table.getType() == TableType.MATERIALIZED_VIEW) {
             Env.getCurrentEnv().getMtmvService().deregisterMTMV((MTMV) table);
         }
-
+        
Env.getCurrentEnv().getAnalysisManager().removeTableStats(table.getId());
         db.unregisterTable(table.getName());
         StopWatch watch = StopWatch.createStarted();
         Env.getCurrentRecycleBin().recycleTable(db.getId(), table, isReplay, 
isForceDrop, recycleTime);
@@ -1022,7 +1019,6 @@ public class InternalCatalog implements 
CatalogIf<Database> {
         try {
             unprotectDropTable(db, table, isForceDrop, isReplay, recycleTime);
             
Env.getCurrentEnv().getQueryStats().clear(Env.getCurrentInternalCatalog().getId(),
 db.getId(), tableId);
-            
Env.getCurrentEnv().getAnalysisManager().removeTableStats(table.getId());
         } finally {
             table.writeUnlock();
             db.writeUnlock();


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

Reply via email to