xiangdong Huang created IOTDB-318:
-------------------------------------

             Summary: do not print error log into log_error.log file when the 
server receives a wrong SQL
                 Key: IOTDB-318
                 URL: https://issues.apache.org/jira/browse/IOTDB-318
             Project: Apache IoTDB
          Issue Type: Bug
    Affects Versions: 0.9.0
            Reporter: xiangdong Huang


Hi, 

log_error.log and log_warn.log are two important files for DBA, and the 
messages in those files should be valuable enough. 

 

Now, if a client sends a incorrect sql to iotdb, e.g., " show select a from 
from root.b;", then the server will print error info to log_error.log, like :

 

2019-11-23 10:35:13,749 [pool-2-IoTDB-JDBC-Client-thread-15] ERROR 
org.apache.iotdb.db.service.TSServiceImpl:653 - meet error while parsing SQL to 
physical plan:2019-11-23 10:35:13,749 [pool-2-IoTDB-JDBC-Client-thread-15] 
ERROR org.apache.iotdb.db.service.TSServiceImpl:653 - meet error while parsing 
SQL to physical 
plan:org.apache.iotdb.db.exception.query.IllegalASTFormatException: Parsing 
error, statement [show devices root.perform.group_9] failed when parsing AST 
tree to generate logical operator. Detailed information: [line 1:5  'show'] at 
org.apache.iotdb.db.qp.QueryProcessor.parseSQLToAST(QueryProcessor.java:102) at 
org.apache.iotdb.db.qp.QueryProcessor.parseSQLToPhysicalPlan(QueryProcessor.java:69)
 at 
org.apache.iotdb.db.service.TSServiceImpl.executeStatement(TSServiceImpl.java:633)
 at 
org.apache.iotdb.service.rpc.thrift.TSIService$Processor$executeStatement.getResult(TSIService.java:1465)
 at 
org.apache.iotdb.service.rpc.thrift.TSIService$Processor$executeStatement.getResult(TSIService.java:1450)
 at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) at 
org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) at 
org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
 at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
at java.lang.Thread.run(Thread.java:748)

 

This kind of error can just be considered as an info level log, and do not need 
to print its exception stack.

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to