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 2021/09/28 04:42:48 UTC

[iotdb] branch MNodeIntern created (now e6dfef8)

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

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


      at e6dfef8  Intern MNode name String

This branch includes the following new commits:

     new e6dfef8  Intern MNode name String

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: Intern MNode name String

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

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

commit e6dfef8b6aaa3b5e0131e0dd8b0cf115057dbeea
Author: HTHou <hh...@outlook.com>
AuthorDate: Tue Sep 28 12:42:01 2021 +0800

    Intern MNode name String
---
 server/src/main/java/org/apache/iotdb/db/metadata/mnode/MNode.java    | 4 ++--
 .../java/org/apache/iotdb/db/metadata/mnode/MeasurementMNode.java     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/mnode/MNode.java b/server/src/main/java/org/apache/iotdb/db/metadata/mnode/MNode.java
index c35c8ed..3519fb2 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/mnode/MNode.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/mnode/MNode.java
@@ -77,7 +77,7 @@ public class MNode implements Serializable {
   /** Constructor of MNode. */
   public MNode(MNode parent, String name) {
     this.parent = parent;
-    this.name = name;
+    this.name = name.intern();
   }
 
   /** check whether the MNode has a child with the name */
@@ -278,7 +278,7 @@ public class MNode implements Serializable {
   }
 
   public void setName(String name) {
-    this.name = name;
+    this.name = name.intern();
   }
 
   public void serializeTo(MLogWriter logWriter) throws IOException {
diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/mnode/MeasurementMNode.java b/server/src/main/java/org/apache/iotdb/db/metadata/mnode/MeasurementMNode.java
index 5f096bd..fbb9603 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/mnode/MeasurementMNode.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/mnode/MeasurementMNode.java
@@ -54,7 +54,7 @@ public class MeasurementMNode extends MNode {
       CompressionType type,
       Map<String, String> props) {
     super(parent, measurementName);
-    this.schema = new MeasurementSchema(measurementName, dataType, encoding, type, props);
+    this.schema = new MeasurementSchema(measurementName.intern(), dataType, encoding, type, props);
     this.alias = alias;
   }