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/07/06 03:27:51 UTC

[iotdb] branch ResourceIntern12 created (now 45658ab)

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

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


      at 45658ab  Use String.intern() in TsFileResource

This branch includes the following new commits:

     new 45658ab  Use String.intern() in TsFileResource

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: Use String.intern() in TsFileResource

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

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

commit 45658ab0bfb9102fbe91fa0989c2fc836df14de5
Author: HTHou <hh...@outlook.com>
AuthorDate: Tue Jul 6 11:27:11 2021 +0800

    Use String.intern() in TsFileResource
---
 .../java/org/apache/iotdb/db/engine/storagegroup/TsFileResource.java  | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileResource.java b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileResource.java
index 16cdb54..c42e9d3 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileResource.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileResource.java
@@ -315,20 +315,24 @@ public class TsFileResource {
   }
 
   public void updateStartTime(String device, long time) {
+    device = device.intern();
     timeIndex.updateStartTime(device, time);
   }
 
   // used in merge, refresh all start time
   public void putStartTime(String device, long time) {
+    device = device.intern();
     timeIndex.putStartTime(device, time);
   }
 
   public void updateEndTime(String device, long time) {
+    device = device.intern();
     timeIndex.updateEndTime(device, time);
   }
 
   // used in merge, refresh all end time
   public void putEndTime(String device, long time) {
+    device = device.intern();
     timeIndex.putEndTime(device, time);
   }