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 2020/11/04 12:19:35 UTC

[iotdb] branch TagBug created (now 26f1a8c)

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

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


      at 26f1a8c  skip while the tag value is null

This branch includes the following new commits:

     new 26f1a8c  skip while the tag value is null

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 while the tag value is null

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

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

commit 26f1a8c9e9833aa288c878d038c57a59dcac2e79
Author: JackieTien97 <Ja...@foxmail.com>
AuthorDate: Wed Nov 4 20:19:01 2020 +0800

    skip while the tag value is null
---
 .../java/org/apache/iotdb/db/metadata/MManager.java     | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/MManager.java b/server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
index 8d244dc..eb7f949 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/MManager.java
@@ -374,7 +374,7 @@ public class MManager {
         }
         // two time series may set one storage group concurrently,
         // that's normal in our concurrency control protocol
-        catch (MetadataException e){
+        catch (MetadataException e) {
           logger.info("concurrently operate set storage group cmd {} twice", cmd);
         }
         break;
@@ -566,7 +566,7 @@ public class MManager {
     // TODO: delete the path node and all its ancestors
     mNodeCache.clear();
     totalSeriesNumber.addAndGet(-1);
-    if (!allowToCreateNewSeries && 
+    if (!allowToCreateNewSeries &&
         totalSeriesNumber.get() * ESTIMATED_SERIES_SIZE < MTREE_SIZE_THRESHOLD) {
       logger.info("Current series number {} come back to normal level", totalSeriesNumber);
       allowToCreateNewSeries = true;
@@ -600,7 +600,7 @@ public class MManager {
       for (PartialPath storageGroup : storageGroups) {
         totalSeriesNumber.addAndGet(mtree.getAllTimeseriesCount(storageGroup));
         // clear cached MNode
-        if (!allowToCreateNewSeries && 
+        if (!allowToCreateNewSeries &&
             totalSeriesNumber.get() * ESTIMATED_SERIES_SIZE < MTREE_SIZE_THRESHOLD) {
           logger.info("Current series number {} come back to normal level", totalSeriesNumber);
           allowToCreateNewSeries = true;
@@ -821,6 +821,9 @@ public class MManager {
     List<MeasurementMNode> allMatchedNodes = new ArrayList<>();
     if (plan.isContains()) {
       for (Entry<String, Set<MeasurementMNode>> entry : value2Node.entrySet()) {
+        if (entry.getKey() == null || entry.getValue() == null) {
+          continue;
+        }
         String tagValue = entry.getKey();
         if (tagValue.contains(plan.getValue())) {
           allMatchedNodes.addAll(entry.getValue());
@@ -828,6 +831,9 @@ public class MManager {
       }
     } else {
       for (Entry<String, Set<MeasurementMNode>> entry : value2Node.entrySet()) {
+        if (entry.getKey() == null || entry.getValue() == null) {
+          continue;
+        }
         String tagValue = entry.getKey();
         if (plan.getValue().equals(tagValue)) {
           allMatchedNodes.addAll(entry.getValue());
@@ -1774,8 +1780,9 @@ public class MManager {
         if (measurementMNode.getSchema().getType() != insertDataType) {
           logger.warn("DataType mismatch, Insert measurement {} type {}, metadata tree type {}",
               measurementList[i], insertDataType, measurementMNode.getSchema().getType());
-          DataTypeMismatchException mismatchException = new DataTypeMismatchException(measurementList[i],
-                  insertDataType, measurementMNode.getSchema().getType());
+          DataTypeMismatchException mismatchException = new DataTypeMismatchException(
+              measurementList[i],
+              insertDataType, measurementMNode.getSchema().getType());
           if (!config.isEnablePartialInsert()) {
             throw mismatchException;
           } else {