You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2022/06/14 09:37:37 UTC
[iotdb] branch standalone_deletesg created (now bcd74ca619)
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a change to branch standalone_deletesg
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at bcd74ca619 [IOTDB-3486] Support deleteStorageGroup for new standalone IoTDB
This branch includes the following new commits:
new 6dc19983ea init
new bcd74ca619 [IOTDB-3486] Support deleteStorageGroup for new standalone IoTDB
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[iotdb] 01/02: init
Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch standalone_deletesg
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 6dc19983ea5a074914318a882c9eae4e23b0df07
Author: HTHou <hh...@outlook.com>
AuthorDate: Tue Jun 14 17:29:59 2022 +0800
init
---
.../org/apache/iotdb/db/localconfignode/LocalConfigNode.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/server/src/main/java/org/apache/iotdb/db/localconfignode/LocalConfigNode.java b/server/src/main/java/org/apache/iotdb/db/localconfignode/LocalConfigNode.java
index daa08cae18..0df9762c61 100644
--- a/server/src/main/java/org/apache/iotdb/db/localconfignode/LocalConfigNode.java
+++ b/server/src/main/java/org/apache/iotdb/db/localconfignode/LocalConfigNode.java
@@ -268,6 +268,12 @@ public class LocalConfigNode {
public void deleteStorageGroup(PartialPath storageGroup) throws MetadataException {
+ if (!config.isClusterMode()) {
+ deleteDataRegionsInStorageGroup(
+ dataPartitionTable.getDataRegionIdsByStorageGroup(storageGroup));
+ dataPartitionTable.deleteStorageGroup(storageGroup);
+ }
+
DeleteTimeSeriesPlan deleteTimeSeriesPlan =
SchemaSyncManager.getInstance().isEnableSync()
? SchemaSyncManager.getInstance()
@@ -313,6 +319,12 @@ public class LocalConfigNode {
}
}
+ private void deleteDataRegionsInStorageGroup(List<DataRegionId> dataRegionIdSet) {
+ for (DataRegionId dataRegionId : dataRegionIdSet) {
+ storageEngine.deleteDataRegion(dataRegionId);
+ }
+ }
+
/**
* Delete storage groups of given paths from MTree.
*
[iotdb] 02/02: [IOTDB-3486] Support deleteStorageGroup for new standalone IoTDB
Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch standalone_deletesg
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit bcd74ca6197cb90fe426d2cb689694fef3ed9799
Author: HTHou <hh...@outlook.com>
AuthorDate: Tue Jun 14 17:37:16 2022 +0800
[IOTDB-3486] Support deleteStorageGroup for new standalone IoTDB
---
.../plan/execution/config/executor/StandsloneConfigTaskExecutor.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/StandsloneConfigTaskExecutor.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/StandsloneConfigTaskExecutor.java
index 4a2ff08050..550241a1ad 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/StandsloneConfigTaskExecutor.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/StandsloneConfigTaskExecutor.java
@@ -103,9 +103,9 @@ public class StandsloneConfigTaskExecutor implements IConfigTaskExecutor {
String storageGroup = storageGroupMNode.getFullPath();
TStorageGroupSchema storageGroupSchema = storageGroupMNode.getStorageGroupSchema();
storageGroupSchemaMap.put(storageGroup, storageGroupSchema);
- // build TSBlock
- ShowStorageGroupTask.buildTSBlock(storageGroupSchemaMap, future);
}
+ // build TSBlock
+ ShowStorageGroupTask.buildTSBlock(storageGroupSchemaMap, future);
} catch (MetadataException e) {
future.setException(e);
}