You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2020/10/28 07:51:23 UTC

[GitHub] [iotdb] SteveYurongSu opened a new pull request #1884: [IOTDB-749] Handle select * from root OOM

SteveYurongSu opened a new pull request #1884:
URL: https://github.com/apache/iotdb/pull/1884


   This is a patch for PR#1367. 
   -  Fixed slimit / soffset logical errors in ConcatPathOptimizer
   -  Added integration tests. These tests will fail if the patch is not added


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] HTHou merged pull request #1884: [IOTDB-749] Handle select * from root OOM

Posted by GitBox <gi...@apache.org>.
HTHou merged pull request #1884:
URL: https://github.com/apache/iotdb/pull/1884


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] SteveYurongSu commented on pull request #1884: [IOTDB-749] Handle select * from root OOM

Posted by GitBox <gi...@apache.org>.
SteveYurongSu commented on pull request #1884:
URL: https://github.com/apache/iotdb/pull/1884#issuecomment-717762616


   @JackieTien97 plz have a review :D 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] JackieTien97 commented on a change in pull request #1884: [IOTDB-749] Handle select * from root OOM

Posted by GitBox <gi...@apache.org>.
JackieTien97 commented on a change in pull request #1884:
URL: https://github.com/apache/iotdb/pull/1884#discussion_r513853377



##########
File path: server/src/test/java/org/apache/iotdb/db/integration/IoTDBQueryMemoryControlIT.java
##########
@@ -0,0 +1,213 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iotdb.db.integration;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSetMetaData;
+import java.sql.Statement;
+import org.apache.iotdb.db.conf.IoTDBDescriptor;
+import org.apache.iotdb.db.utils.EnvironmentUtils;
+import org.apache.iotdb.jdbc.Config;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class IoTDBQueryMemoryControlIT {
+
+  private static final String[] sqls = new String[]{
+      "set storage group to root.ln",
+
+      "create timeseries root.ln.wf01.wt01 with datatype=BOOLEAN,encoding=PLAIN",
+      "create timeseries root.ln.wf01.wt02 with datatype=BOOLEAN,encoding=PLAIN",
+      "create timeseries root.ln.wf01.wt03 with datatype=BOOLEAN,encoding=PLAIN",
+      "create timeseries root.ln.wf01.wt04 with datatype=BOOLEAN,encoding=PLAIN",
+      "create timeseries root.ln.wf01.wt05 with datatype=BOOLEAN,encoding=PLAIN",
+
+      "create timeseries root.ln.wf02.wt01 with datatype=FLOAT,encoding=RLE",
+      "create timeseries root.ln.wf02.wt02 with datatype=FLOAT,encoding=RLE",
+      "create timeseries root.ln.wf02.wt03 with datatype=FLOAT,encoding=RLE",
+      "create timeseries root.ln.wf02.wt04 with datatype=FLOAT,encoding=RLE",
+      "create timeseries root.ln.wf02.wt05 with datatype=FLOAT,encoding=RLE",
+
+      "create timeseries root.ln.wf03.wt01 with datatype=TEXT,encoding=PLAIN",
+      "create timeseries root.ln.wf03.wt02 with datatype=TEXT,encoding=PLAIN",
+      "create timeseries root.ln.wf03.wt03 with datatype=TEXT,encoding=PLAIN",
+      "create timeseries root.ln.wf03.wt04 with datatype=TEXT,encoding=PLAIN",
+      "create timeseries root.ln.wf03.wt05 with datatype=TEXT,encoding=PLAIN",
+  };
+
+  @Before
+  public void setUp() throws Exception {
+    IoTDBDescriptor.getInstance().getConfig().setMaxQueryDeduplicatedPathNum(10);
+    EnvironmentUtils.envSetUp();
+    Class.forName(Config.JDBC_DRIVER_NAME);
+    createTimeSeries();
+  }
+
+  private static void createTimeSeries() {
+    try (Statement statement = DriverManager.getConnection(
+        Config.IOTDB_URL_PREFIX + "127.0.0.1:6667/", "root", "root").createStatement()) {
+      for (String sql : sqls) {
+        statement.execute(sql);
+      }
+    } catch (Exception e) {
+      e.printStackTrace();
+      fail(e.getMessage());
+    }
+  }
+
+  @After
+  public void tearDown() throws Exception {
+    EnvironmentUtils.cleanEnv();

Review comment:
       Don't forget to change the MaxQueryDeduplicatedPathNum back to the default value.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org