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

zyk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new aaa20e3ae26 [IOTDB-5831]Fix drop database won't delete totally files 
in disk during data insertion (#9763)
aaa20e3ae26 is described below

commit aaa20e3ae26e4b0f601ff2f500e7927f96aea655
Author: Marcos_Zyk <[email protected]>
AuthorDate: Fri May 5 16:02:31 2023 +0800

    [IOTDB-5831]Fix drop database won't delete totally files in disk during 
data insertion (#9763)
---
 .../iotdb/confignode/persistence/executor/ConfigPlanExecutor.java  | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/confignode/src/main/java/org/apache/iotdb/confignode/persistence/executor/ConfigPlanExecutor.java
 
b/confignode/src/main/java/org/apache/iotdb/confignode/persistence/executor/ConfigPlanExecutor.java
index 2d54aef73bb..e085476e9df 100644
--- 
a/confignode/src/main/java/org/apache/iotdb/confignode/persistence/executor/ConfigPlanExecutor.java
+++ 
b/confignode/src/main/java/org/apache/iotdb/confignode/persistence/executor/ConfigPlanExecutor.java
@@ -307,8 +307,11 @@ public class ConfigPlanExecutor {
         return clusterSchemaInfo.adjustMaxRegionGroupCount(
             (AdjustMaxRegionGroupNumPlan) physicalPlan);
       case DeleteDatabase:
-        partitionInfo.deleteDatabase((DeleteDatabasePlan) physicalPlan);
-        return clusterSchemaInfo.deleteDatabase((DeleteDatabasePlan) 
physicalPlan);
+        try {
+          return clusterSchemaInfo.deleteDatabase((DeleteDatabasePlan) 
physicalPlan);
+        } finally {
+          partitionInfo.deleteDatabase((DeleteDatabasePlan) physicalPlan);
+        }
       case PreDeleteDatabase:
         return partitionInfo.preDeleteDatabase((PreDeleteDatabasePlan) 
physicalPlan);
       case SetTTL:

Reply via email to