Xiangdong Huang created IOTDB-2055:
--------------------------------------

             Summary: degrade server side's log level when the parameters in 
insertRecord() are invalid
                 Key: IOTDB-2055
                 URL: https://issues.apache.org/jira/browse/IOTDB-2055
             Project: Apache IoTDB
          Issue Type: Improvement
            Reporter: Xiangdong Huang


[https://github.com/apache/iotdb/issues/4446] shows an unpredictable behavior 
but it has been fixed in v0.12.3.

>From v0.12.3 on, the server side will check whether the parameters are valid, 
>and show exception errors on the server-side and return failure to clients.

 

The client-side:
{panel}
Exception in thread "main" org.apache.iotdb.rpc.StatementExecutionException: 
313: failed to insert measurements [TL_JS06.R_50NeckTemp2] caused by 
TL_JS06.R_50NeckTemp2 is an illegal measurementId
at org.apache.iotdb.rpc.RpcUtils.verifySuccess(RpcUtils.java:86)
at org.apache.iotdb.rpc.RpcUtils.verifySuccessWithRedirection(RpcUtils.java:92)
at 
org.apache.iotdb.session.SessionConnection.insertRecord(SessionConnection.java:465)
at org.apache.iotdb.session.Session.insertRecord(Session.java:742)
at org.apache.iotdb.session.Session.insertRecord(Session.java:902)
at org.apache.iotdb.SessionExample.insertRecord(SessionExample.java:41)
at org.apache.iotdb.SessionExample.main(SessionExample.java:57)
{panel}
 

The server-side:
{panel}
2021-11-24 21:03:08,614 [pool-14-IoTDB-RPC-Client-2] WARN 
o.a.i.d.metadata.MManager:1966 - meet error when check 
root.test.SD-T-JS006.TL_JS06.R_50NeckTemp2, message: TL_JS06.R_50NeckTemp2 is 
an illegal measurementId
2021-11-24 21:03:08,615 [pool-14-IoTDB-RPC-Client-2] WARN 
o.a.i.d.s.TSServiceImpl:1957 - Exception occurred while processing non-query.
org.apache.iotdb.db.exception.query.QueryProcessException: 
org.apache.iotdb.db.exception.StorageEngineException: failed to insert 
measurements [TL_JS06.R_50NeckTemp2] caused by TL_JS06.R_50NeckTemp2 is an 
illegal measurementId
at org.apache.iotdb.db.qp.executor.PlanExecutor.insert(PlanExecutor.java:1392)
at 
org.apache.iotdb.db.qp.executor.PlanExecutor.processNonQuery(PlanExecutor.java:246)
at 
org.apache.iotdb.db.service.TSServiceImpl.executeNonQuery(TSServiceImpl.java:1150)
at 
org.apache.iotdb.db.service.TSServiceImpl.executeNonQueryPlan(TSServiceImpl.java:1888)
at 
org.apache.iotdb.db.service.TSServiceImpl.insertStringRecord(TSServiceImpl.java:1496)
at 
org.apache.iotdb.service.rpc.thrift.TSIService$Processor$insertStringRecord.getResult(TSIService.java:2798)
at 
org.apache.iotdb.service.rpc.thrift.TSIService$Processor$insertStringRecord.getResult(TSIService.java:2778)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:38)
at 
org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:248)
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)
Caused by: org.apache.iotdb.db.exception.StorageEngineException: failed to 
insert measurements [TL_JS06.R_50NeckTemp2] caused by TL_JS06.R_50NeckTemp2 is 
an illegal measurementId
at 
org.apache.iotdb.db.qp.executor.PlanExecutor.checkFailedMeasurments(PlanExecutor.java:1292)
at org.apache.iotdb.db.qp.executor.PlanExecutor.insert(PlanExecutor.java:1386)
... 12 common frames omitted
{panel}
 

The info in the client-side is ok, but the server-side info has improper log 
level: it is just caused by an incorrect client input, just a{color:#FF0000} 
debug level {color}message is fine.

Otherwise, if someone sends a lot of such incorrect requests, the server will 
be attracted by too many logs. 

 

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to