[ https://issues.apache.org/jira/browse/IOTDB-376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jialin Qiao closed IOTDB-376. ----------------------------- Fix Version/s: 0.10.0-SNAPSHOT Resolution: Fixed > 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.0, 0.9.0, 0.8.1, 0.8.2 > Reporter: Xiangdong Huang > Assignee: Yuxin Zhang > Priority: Major > Labels: easy-fix, pull-request-available > Fix For: 0.10.0-SNAPSHOT > > Time Spent: 20m > Remaining Estimate: 0h > > 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)