This is an automated email from the ASF dual-hosted git repository.
justinchen pushed a commit to branch last-permission
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/last-permission by this push:
new 0ecbd0143cc fix
0ecbd0143cc is described below
commit 0ecbd0143cc2b7904d4b11e92321414ff774763e
Author: Caideyipi <[email protected]>
AuthorDate: Mon Apr 13 16:33:11 2026 +0800
fix
---
.../org/apache/iotdb/rest/protocol/v2/impl/RestApiServiceImpl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/impl/RestApiServiceImpl.java
b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/impl/RestApiServiceImpl.java
index 08338c8dde4..e708c9434cd 100644
---
a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/impl/RestApiServiceImpl.java
+++
b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/v2/impl/RestApiServiceImpl.java
@@ -123,7 +123,6 @@ public class RestApiServiceImpl extends RestApiService {
new PartialPath(prefixPathList.getPrefixPaths().toArray(new
String[0]));
final Map<TableId, Map<IDeviceID, Map<String, Pair<TSDataType,
TimeValuePair>>>> resultMap =
new HashMap<>();
- int sensorNum = 0;
final String prefixString = prefixPath.toString();
for (final ISchemaRegion region :
SchemaEngine.getInstance().getAllSchemaRegions()) {
@@ -131,9 +130,10 @@ public class RestApiServiceImpl extends RestApiService {
&& !region.getDatabaseFullPath().startsWith(prefixString)) {
continue;
}
- sensorNum += region.fillLastQueryMap(prefixPath, resultMap);
+ region.fillLastQueryMap(prefixPath, resultMap);
}
+ // Check permission, the cost is rather low because the req only
contains one prefix path
final IClientSession clientSession = SESSION_MANAGER.getCurrSession();
final TSLastDataQueryReq tsLastDataQueryReq =
FastLastHandler.createTSLastDataQueryReq(clientSession,
prefixPathList);