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

qiaojialin pushed a commit to branch fix_get_null_by_while
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git

commit 99e8bdd915855b7c891ed015dcefba73756ce146
Author: qiaojialin <[email protected]>
AuthorDate: Tue Jun 2 20:03:39 2020 +0800

    fix bug
---
 .../java/org/apache/iotdb/db/conf/IoTDBConfig.java    |  2 +-
 .../db/engine/storagegroup/StorageGroupProcessor.java | 19 +++++++++++++++++++
 .../org/apache/iotdb/db/qp/executor/PlanExecutor.java | 19 +++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java 
b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
index 93b3f41..ec2b29c 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
@@ -131,7 +131,7 @@ public class IoTDBConfig {
   /**
    * Is dynamic parameter adapter enable.
    */
-  private boolean enableParameterAdapter = true;
+  private boolean enableParameterAdapter = false;
 
   /**
    * Is the write ahead log enable.
diff --git 
a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
 
b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
index 32f5dfe..3f190b6 100755
--- 
a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
@@ -768,6 +768,16 @@ public class StorageGroupProcessor {
       for (int i = 0; i < measurementList.length; i++) {
         // Update cached last value with high priority
         MNode measurementNode = node.getChild(measurementList[i]);
+
+        int tempCount = 0;
+        while (measurementNode == null) {
+          tempCount ++;
+          if (tempCount % 10000 == 0) {
+            logger.warn("try to get child {} 10000 times from {}", 
measurementList[i], plan.getDeviceId());
+          }
+          measurementNode = node.getChild(measurementList[i]);
+        }
+
         ((LeafMNode) measurementNode)
             .updateCachedLast(plan.composeLastTimeValuePair(i), true, 
latestFlushedTime);
       }
@@ -824,6 +834,15 @@ public class StorageGroupProcessor {
         // Update cached last value with high priority
         MNode measurementNode = node.getChild(measurementList[i]);
 
+        int tempCount = 0;
+        while (measurementNode == null) {
+          tempCount ++;
+          if (tempCount % 10000 == 0) {
+            logger.warn("try to get child {} 10000 times from {}", 
measurementList[i], plan.getDeviceId());
+          }
+          measurementNode = node.getChild(measurementList[i]);
+        }
+
         ((LeafMNode) measurementNode)
             .updateCachedLast(plan.composeTimeValuePair(i), true, 
latestFlushedTime);
       }
diff --git 
a/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java 
b/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
index f3be36d..9ba8fa4 100644
--- a/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
+++ b/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
@@ -887,6 +887,16 @@ public class PlanExecutor implements IPlanExecutor {
             internalCreateTimeseries(path.toString(), dataType);
           }
           LeafMNode measurementNode = (LeafMNode) node.getChild(measurement);
+
+          int tempCount = 0;
+          while (measurementNode == null) {
+            tempCount ++;
+            if (tempCount % 10000 == 0) {
+              logger.warn("try to get child {} 10000 times from {}", 
measurement, deviceId);
+            }
+            measurementNode = (LeafMNode) node.getChild(measurement);
+          }
+
           schemas[i] = measurementNode.getSchema();
           // reset measurement to common name instead of alias
           measurementList[i] = measurementNode.getName();
@@ -1034,6 +1044,15 @@ public class PlanExecutor implements IPlanExecutor {
         }
         LeafMNode measurementNode = (LeafMNode) 
node.getChild(measurementList[i]);
 
+        int tempCount = 0;
+        while (measurementNode == null) {
+          tempCount ++;
+          if (tempCount % 10000 == 0) {
+            logger.warn("try to get child {} 10000 times from {}", 
measurementList[i], deviceId);
+          }
+          measurementNode = (LeafMNode) node.getChild(measurementList[i]);
+        }
+
         // check data type
         if (measurementNode.getSchema().getType() != 
insertTabletPlan.getDataTypes()[i]) {
           throw new QueryProcessException(

Reply via email to