You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2024/06/19 08:48:01 UTC

(iotdb) branch chaunjishe created (now c8ae6d3627c)

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

jackietien pushed a change to branch chaunjishe
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at c8ae6d3627c Skip visitConstructSchemaBlackList and visitRollbackSchemaBlackList with more than one pattern or one pattern containing **

This branch includes the following new commits:

     new c8ae6d3627c Skip visitConstructSchemaBlackList and visitRollbackSchemaBlackList with more than one pattern or one pattern containing **

The 1 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/01: Skip visitConstructSchemaBlackList and visitRollbackSchemaBlackList with more than one pattern or one pattern containing **

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c8ae6d3627cb7f7e77124b722583c1e5bda2ed18
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Wed Jun 19 16:47:43 2024 +0800

    Skip visitConstructSchemaBlackList and visitRollbackSchemaBlackList with more than one pattern or one pattern containing **
---
 .mvn/.develocity/develocity-workspace-id                          | 1 +
 .../statemachine/schemaregion/SchemaExecutionVisitor.java         | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/.mvn/.develocity/develocity-workspace-id b/.mvn/.develocity/develocity-workspace-id
new file mode 100644
index 00000000000..b4c2b2db98b
--- /dev/null
+++ b/.mvn/.develocity/develocity-workspace-id
@@ -0,0 +1 @@
+b2dymjp63fdnpl3onsmfkpijau
\ No newline at end of file
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaExecutionVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaExecutionVisitor.java
index 904863ddcc6..daab6557b90 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaExecutionVisitor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaExecutionVisitor.java
@@ -380,6 +380,10 @@ public class SchemaExecutionVisitor extends PlanVisitor<TSStatus, ISchemaRegion>
   public TSStatus visitConstructSchemaBlackList(
       ConstructSchemaBlackListNode node, ISchemaRegion schemaRegion) {
     try {
+      List<PartialPath> pathPatternList = node.getPatternTree().getAllPathPatterns();
+      if (pathPatternList.size() > 1 || pathPatternList.get(0).hasMultiLevelMatchWildcard()) {
+        return RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS, String.valueOf(0));
+      }
       long preDeletedNum = schemaRegion.constructSchemaBlackList(node.getPatternTree());
       return RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS, String.valueOf(preDeletedNum));
     } catch (MetadataException e) {
@@ -392,6 +396,10 @@ public class SchemaExecutionVisitor extends PlanVisitor<TSStatus, ISchemaRegion>
   public TSStatus visitRollbackSchemaBlackList(
       RollbackSchemaBlackListNode node, ISchemaRegion schemaRegion) {
     try {
+      List<PartialPath> pathPatternList = node.getPatternTree().getAllPathPatterns();
+      if (pathPatternList.size() > 1 || pathPatternList.get(0).hasMultiLevelMatchWildcard()) {
+        return RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS);
+      }
       schemaRegion.rollbackSchemaBlackList(node.getPatternTree());
       return RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS);
     } catch (MetadataException e) {