Xiangdong Huang created IOTDB-376: ------------------------------------- Summary: Metric module is not enabled when calling executeQueryStatement() Key: IOTDB-376 URL: https://issues.apache.org/jira/browse/IOTDB-376 Project: Apache IoTDB Issue Type: Bug Affects Versions: 0.8.2, 0.8.1, 0.9.0, 0.8.0 Reporter: Xiangdong Huang
The metric module can records at most 200 recent query sqls, using 127.0.0.1:8181 to access the module. However, it effects only when users call executeStatement(). When users call executeQueryStatement(), the related module is not called to update the records. It is easy to fix, just copy some codes in executeStatement() method to executeQueryStatement(): {code:java} // code placeholder sqlArgument = new SqlArgument(resp, physicalPlan, statement, startTime, endTime); sqlArgumentsList.add(sqlArgument); if (sqlArgumentsList.size() > MAX_SIZE) { sqlArgumentsList.subList(0, DELETE_SIZE).clear(); } {code} Of course, put the above codes into a new function and let executeStatement() and executeQueryStatement() (and maybe some other functions) call the new function is a good choice. By the way, it is a good idea if we can set MAX_SIZE in the configuration file. -- This message was sent by Atlassian Jira (v8.3.4#803005)