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:52 UTC
[iotdb] 01/01: Use String.intern() in TsFileResource
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);
}