[ 
https://issues.apache.org/jira/browse/IOTDB-376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17048564#comment-17048564
 ] 

Yuxin Zhang commented on IOTDB-376:
-----------------------------------

hi, I've finished this issue in PR 
[https://github.com/apache/incubator-iotdb/pull/863,] please have a look at it.

> 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
>            Priority: Major
>              Labels: easy-fix, pull-request-available
>          Time Spent: 10m
>  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)

Reply via email to