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/09/23 03:11:56 UTC

[iotdb] branch master updated: [IOTDB-4495][PartitionCache] Add auto create schema judgement (#7411)

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

haonan 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 aebafee38e [IOTDB-4495][PartitionCache] Add auto create schema judgement (#7411)
aebafee38e is described below

commit aebafee38e5360fd396e700e0568b37134721b49
Author: ZhangHongYin <46...@users.noreply.github.com>
AuthorDate: Fri Sep 23 11:11:50 2022 +0800

    [IOTDB-4495][PartitionCache] Add auto create schema judgement (#7411)
---
 .../org/apache/iotdb/db/mpp/plan/analyze/cache/PartitionCache.java     | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/cache/PartitionCache.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/cache/PartitionCache.java
index 86fbe66bad..4a079f621c 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/cache/PartitionCache.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/cache/PartitionCache.java
@@ -313,7 +313,6 @@ public class PartitionCache {
       List<String> devicePaths,
       boolean secondTry,
       boolean isAutoCreate) {
-    Map<String, String> deviceToStorageGroupMap = new HashMap<>();
     // miss when devicePath contains *
     for (String devicePath : devicePaths) {
       if (devicePath.contains("*")) {
@@ -328,7 +327,7 @@ public class PartitionCache {
         fetchStorageGroupAndUpdateCache(result, devicePaths);
         // second try to hit storage group in fast-fail way
         getStorageGroupMap(result, devicePaths, true);
-        if (!result.isSuccess() && isAutoCreate) {
+        if (!result.isSuccess() && isAutoCreate && config.isAutoCreateSchemaEnabled()) {
           // try to auto create storage group of failed device
           createStorageGroupAndUpdateCache(result, devicePaths);
           // third try to hit storage group in fast-fail way