This is an automated email from the ASF dual-hosted git repository.
HTHou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 75d685579de Fix REST table metric statement type labels (#17757)
75d685579de is described below
commit 75d685579de9a1e3abc219db023bf9369ad72ca3
Author: Haonan <[email protected]>
AuthorDate: Mon May 25 16:16:40 2026 +0800
Fix REST table metric statement type labels (#17757)
---
.../iotdb/rest/protocol/table/v1/impl/RestApiServiceImpl.java | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git
a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/impl/RestApiServiceImpl.java
b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/impl/RestApiServiceImpl.java
index 2d0a363c339..607e96620f6 100644
---
a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/impl/RestApiServiceImpl.java
+++
b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/impl/RestApiServiceImpl.java
@@ -34,6 +34,7 @@ import
org.apache.iotdb.db.queryengine.plan.planner.LocalExecutionPlanner;
import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata;
import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Insert;
import org.apache.iotdb.db.queryengine.plan.relational.sql.parser.SqlParser;
+import org.apache.iotdb.db.queryengine.plan.statement.StatementType;
import
org.apache.iotdb.db.queryengine.plan.statement.crud.InsertTabletStatement;
import org.apache.iotdb.db.utils.CommonUtils;
import org.apache.iotdb.db.utils.SetThreadName;
@@ -139,7 +140,7 @@ public class RestApiServiceImpl extends RestApiService {
.ifPresent(
s ->
CommonUtils.addStatementExecutionLatency(
- OperationType.EXECUTE_QUERY_STATEMENT, s.toString(),
costTime));
+ OperationType.EXECUTE_QUERY_STATEMENT,
StatementType.QUERY.name(), costTime));
}
}
@@ -194,7 +195,6 @@ public class RestApiServiceImpl extends RestApiService {
SqlParser relationSqlParser = new SqlParser();
Long queryId = null;
Statement statement = null;
- long startTime = System.nanoTime();
try {
IClientSession clientSession = SESSION_MANAGER.getCurrSession();
statement = createStatement(sql, clientSession, relationSqlParser);
@@ -233,12 +233,6 @@ public class RestApiServiceImpl extends RestApiService {
} catch (Exception e) {
return
Response.ok().entity(ExceptionHandler.tryCatchException(e)).build();
} finally {
- long costTime = System.nanoTime() - startTime;
- Optional.ofNullable(statement)
- .ifPresent(
- s ->
- CommonUtils.addStatementExecutionLatency(
- OperationType.EXECUTE_NON_QUERY_PLAN, s.toString(),
costTime));
if (queryId != null) {
COORDINATOR.cleanupQueryExecution(queryId);
}