You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Xiangdong Huang (Jira)" <ji...@apache.org> on 2021/08/12 02:22:00 UTC
[jira] [Created] (IOTDB-1562) incorrect exception processing in
insertXXX() API
Xiangdong Huang created IOTDB-1562:
--------------------------------------
Summary: incorrect exception processing in insertXXX() API
Key: IOTDB-1562
URL: https://issues.apache.org/jira/browse/IOTDB-1562
Project: Apache IoTDB
Issue Type: Bug
Components: Server
Affects Versions: 0.12.1, 0.13.0
Reporter: Xiangdong Huang
in TSServiceImpl, the exception processing and error code are incorrect for insertXXX() API.
See an example,
In org.apache.iotdb.cluster.integration.SingleNodeTest (notice this is just an example, it has no relation with the cluster module).
The IT constructs a case that writing data to "root..ln.dev1" (notice the path is illegal).
However, let's see what happens in the log output:
{noformat}
WARN [2021-08-12 09:56:10,987] [pool-69-IoTDB-Cluster-RPC-Client-1] org.apache.iotdb.db.service.TSServiceImpl:2153 - [INTERNAL_SERVER_ERROR] Exception occurred while inserting string records.
org.apache.iotdb.db.exception.metadata.IllegalPathException: root..ln1 is not a legal path
at org.apache.iotdb.db.metadata.MetaUtils.splitPathToDetachedPath(MetaUtils.java:56)
at org.apache.iotdb.db.metadata.PartialPath.<init>(PartialPath.java:55)
at org.apache.iotdb.db.service.TSServiceImpl.insertStringRecords(TSServiceImpl.java:1473)
at org.apache.iotdb.service.rpc.thrift.TSIService$Processor$insertStringRecords.getResult(TSIService.java:3068)
at org.apache.iotdb.service.rpc.thrift.TSIService$Processor$insertStringRecords.getResult(TSIService.java:3048)
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.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
{noformat}
It is obversely incorrect as it is not a 500 error.
Please notice that not only `insertStringRecords` is incorrect, but also other insertXXX APIs.
According to [https://iotdb.apache.org/UserGuide/Master/Appendix/Status-Codes.html], 315 error code should be return in this case.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)