Browse Source

Remove pageSize cap from /find/aggHistory endpoint

Aligns with sibling /api/entitiesQuery/find, which serves entity pages
unbounded and is the endpoint paired with /aggHistory in the PE entity-
table export. Capping aggHistory at 100 while /find returns up to 1000
caused entity and aggregated-value lists to fall out of sync on export.
The expensive timeseries reads use tsService.findAllByQueries, the same
path as the WebSocket AggHistoryCmd, which has no such cap.
pull/15429/head
Oleksandra Matviienko 2 weeks ago
parent
commit
fc8ddede16
  1. 4
      application/src/main/java/org/thingsboard/server/controller/EntityQueryController.java

4
application/src/main/java/org/thingsboard/server/controller/EntityQueryController.java

@ -168,10 +168,6 @@ public class EntityQueryController extends BaseController {
if (cmd.getEndTs() < cmd.getStartTs()) {
throw new ThingsboardException("endTs must be >= startTs", ThingsboardErrorCode.BAD_REQUEST_PARAMS);
}
EntityDataPageLink pageLink = request.getQuery().getPageLink();
if (pageLink != null && pageLink.getPageSize() > MAX_PAGE_SIZE) {
pageLink.setPageSize(MAX_PAGE_SIZE);
}
resolveQuery(request.getQuery());
return entityQueryService.findEntityDataAggHistoryByQuery(getCurrentUser(), request.getQuery(), cmd);
}

Loading…
Cancel
Save