You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2020/06/12 16:47:06 UTC
[incubator-iotdb] branch iotdb-727-0.10 updated: fix planExecutor
because new device will be added into TsRecourses from InsertPlan
This is an automated email from the ASF dual-hosted git repository.
hxd pushed a commit to branch iotdb-727-0.10
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/iotdb-727-0.10 by this push:
new db0d78e fix planExecutor because new device will be added into TsRecourses from InsertPlan
db0d78e is described below
commit db0d78ec3106bbbad95551651678d43dba6de977
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Sat Jun 13 00:46:46 2020 +0800
fix planExecutor because new device will be added into TsRecourses from InsertPlan
---
.../src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java | 5 +++++
1 file changed, 5 insertions(+)
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 27c31e6..9aaf201 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
@@ -881,6 +881,8 @@ public class PlanExecutor implements IPlanExecutor {
String[] measurementList = insertPlan.getMeasurements();
String deviceId = insertPlan.getDeviceId();
node = mManager.getDeviceNodeWithAutoCreateAndReadLock(deviceId);
+ // To reduce the String number in memory, set the deviceId from MManager to insertPlan
+ insertPlan.setDeviceId(node.getFullPath());
MeasurementSchema[] schemas = new MeasurementSchema[measurementList.length];
for (int i = 0; i < measurementList.length; i++) {
@@ -1023,6 +1025,9 @@ public class PlanExecutor implements IPlanExecutor {
String[] measurementList = insertTabletPlan.getMeasurements();
String deviceId = insertTabletPlan.getDeviceId();
node = mManager.getDeviceNodeWithAutoCreateAndReadLock(deviceId);
+ // To reduce the String number in memory, use the deviceId from MManager
+ deviceId = node.getFullPath();
+ insertTabletPlan.setDeviceId(deviceId);
TSDataType[] dataTypes = insertTabletPlan.getDataTypes();
IoTDBConfig conf = IoTDBDescriptor.getInstance().getConfig();
MeasurementSchema[] schemas = new MeasurementSchema[measurementList.length];