Uploaded image for project: 'Apache IoTDB'
  1. Apache IoTDB
  2. IOTDB-318

do not print error log into log_error.log file when the server receives a wrong SQL

    XMLWordPrintableJSON

Details

    Description

      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.

       

       

      Attachments

        Issue Links

          Activity

            People

              sunzesong Zesong Sun
              jixuan1989 xiangdong Huang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m