You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "JackieTien97 (via GitHub)" <gi...@apache.org> on 2026/07/08 04:16:27 UTC
[PR] Enforce REST query row limit as hard cap [iotdb]
JackieTien97 opened a new pull request, #18149:
URL: https://github.com/apache/iotdb/pull/18149
## Summary
This PR makes `rest_query_default_row_size_limit` the hard upper bound for REST and Grafana query responses.
## Changes
- Cap user-provided REST `rowLimit` / `row_limit` with `rest_query_default_row_size_limit`.
- Apply the same limit to Grafana variables, node, and expression endpoints instead of passing an unlimited `0`.
- Enforce the cap in v2 fast-last cache-hit responses, which previously built the response directly.
- Centralize row-limit calculation and exceeded-limit response handling in `QueryRowLimitUtils`.
- Update OpenAPI/config comments to describe the setting as a maximum response row limit.
- Add focused regression tests for hard-cap resolution and exact-limit dataset handling.
## Validation
- `mvn spotless:apply -pl external-service-impl/rest`
- `mvn test -pl external-service-impl/rest -Dtest=QueryRowLimitUtilsTest,QueryDataSetHandlerTest`
- `mvn test-compile -pl external-service-impl/rest -P with-zh-locale -DskipTests`
- `mvn test-compile -pl external-service-impl/rest-openapi -DskipTests`
- `git diff --check`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Enforce REST query row limit as hard cap [iotdb]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #18149:
URL: https://github.com/apache/iotdb/pull/18149#issuecomment-4926520972
## [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=18149) **Quality Gate failed**
Failed conditions
 [33.8% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=18149&metric=new_duplicated_lines_density&view=list) (required ≤ 5%)
<!-- sqra:qg_revision=44ea4eea1aabefa3cb56c096e4208eb38867b27ecef7fc3de421effa88f07dcf -->
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=18149)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Enforce REST query row limit as hard cap [iotdb]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #18149:
URL: https://github.com/apache/iotdb/pull/18149#issuecomment-4926630802
## [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=18149) **Quality Gate failed**
Failed conditions
 [29.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=18149&metric=new_duplicated_lines_density&view=list) (required ≤ 5%)
<!-- sqra:qg_revision=8ea05d6727749b9a8ec088a5b5d38a2285aa8d0ce941dc64cc05666a91a87146 -->
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=18149)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Enforce REST query row limit as hard cap [iotdb]
Posted by "JackieTien97 (via GitHub)" <gi...@apache.org>.
JackieTien97 merged PR #18149:
URL: https://github.com/apache/iotdb/pull/18149
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Enforce REST query row limit as hard cap [iotdb]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #18149:
URL: https://github.com/apache/iotdb/pull/18149#issuecomment-4912770482
## [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=18149) **Quality Gate failed**
Failed conditions
 [36.5% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=18149&metric=new_duplicated_lines_density&view=list) (required ≤ 5%)
<!-- sqra:qg_revision=3bfe70fad046dae9ae5bb0d9e55c587741746f618169922bf6c638640e7600d8 -->
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=18149)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Enforce REST query row limit as hard cap [iotdb]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #18149:
URL: https://github.com/apache/iotdb/pull/18149#issuecomment-4911365023
## [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=18149) **Quality Gate failed**
Failed conditions
 [48.7% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=18149&metric=new_duplicated_lines_density&view=list) (required ≤ 5%)
<!-- sqra:qg_revision=b187eb4a6c7bf67584088d83116c8af07695b3ef30e8a6333d25cdea3d79ea6c -->
<!-- sqra-placement-anchor -->
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=18149)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Enforce REST query row limit as hard cap [iotdb]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #18149:
URL: https://github.com/apache/iotdb/pull/18149#issuecomment-4911536483
## [Codecov](https://app.codecov.io/gh/apache/iotdb/pull/18149?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `14.17323%` with `109 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 41.52%. Comparing base ([`e44cbbb`](https://app.codecov.io/gh/apache/iotdb/commit/e44cbbb0e975f087e9744d8ba800f00b5f0840dc?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`65f2e5f`](https://app.codecov.io/gh/apache/iotdb/commit/65f2e5f16ea18e1de7194672643ed10a719f43f8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 2 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/iotdb/pull/18149?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [.../rest/protocol/v2/handler/QueryDataSetHandler.java](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&filepath=external-service-impl%2Frest%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fiotdb%2Frest%2Fprotocol%2Fv2%2Fhandler%2FQueryDataSetHandler.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXh0ZXJuYWwtc2VydmljZS1pbXBsL3Jlc3Qvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2lvdGRiL3Jlc3QvcHJvdG9jb2wvdjIvaGFuZGxlci9RdWVyeURhdGFTZXRIYW5kbGVyLmphdmE=) | 0.00% | [38 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [.../rest/protocol/v1/handler/QueryDataSetHandler.java](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&filepath=external-service-impl%2Frest%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fiotdb%2Frest%2Fprotocol%2Fv1%2Fhandler%2FQueryDataSetHandler.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXh0ZXJuYWwtc2VydmljZS1pbXBsL3Jlc3Qvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2lvdGRiL3Jlc3QvcHJvdG9jb2wvdjEvaGFuZGxlci9RdWVyeURhdGFTZXRIYW5kbGVyLmphdmE=) | 7.89% | [35 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...b/rest/protocol/v1/impl/GrafanaApiServiceImpl.java](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&filepath=external-service-impl%2Frest%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fiotdb%2Frest%2Fprotocol%2Fv1%2Fimpl%2FGrafanaApiServiceImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXh0ZXJuYWwtc2VydmljZS1pbXBsL3Jlc3Qvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2lvdGRiL3Jlc3QvcHJvdG9jb2wvdjEvaW1wbC9HcmFmYW5hQXBpU2VydmljZUltcGwuamF2YQ==) | 0.00% | [8 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...b/rest/protocol/v2/impl/GrafanaApiServiceImpl.java](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&filepath=external-service-impl%2Frest%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fiotdb%2Frest%2Fprotocol%2Fv2%2Fimpl%2FGrafanaApiServiceImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXh0ZXJuYWwtc2VydmljZS1pbXBsL3Jlc3Qvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2lvdGRiL3Jlc3QvcHJvdG9jb2wvdjIvaW1wbC9HcmFmYW5hQXBpU2VydmljZUltcGwuamF2YQ==) | 0.00% | [8 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...otdb/rest/protocol/v2/impl/RestApiServiceImpl.java](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&filepath=external-service-impl%2Frest%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fiotdb%2Frest%2Fprotocol%2Fv2%2Fimpl%2FRestApiServiceImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXh0ZXJuYWwtc2VydmljZS1pbXBsL3Jlc3Qvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2lvdGRiL3Jlc3QvcHJvdG9jb2wvdjIvaW1wbC9SZXN0QXBpU2VydmljZUltcGwuamF2YQ==) | 0.00% | [7 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...protocol/table/v1/handler/QueryDataSetHandler.java](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&filepath=external-service-impl%2Frest%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fiotdb%2Frest%2Fprotocol%2Ftable%2Fv1%2Fhandler%2FQueryDataSetHandler.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXh0ZXJuYWwtc2VydmljZS1pbXBsL3Jlc3Qvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2lvdGRiL3Jlc3QvcHJvdG9jb2wvdGFibGUvdjEvaGFuZGxlci9RdWVyeURhdGFTZXRIYW5kbGVyLmphdmE=) | 0.00% | [6 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...est/protocol/table/v1/impl/RestApiServiceImpl.java](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&filepath=external-service-impl%2Frest%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fiotdb%2Frest%2Fprotocol%2Ftable%2Fv1%2Fimpl%2FRestApiServiceImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXh0ZXJuYWwtc2VydmljZS1pbXBsL3Jlc3Qvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2lvdGRiL3Jlc3QvcHJvdG9jb2wvdGFibGUvdjEvaW1wbC9SZXN0QXBpU2VydmljZUltcGwuamF2YQ==) | 0.00% | [4 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...otdb/rest/protocol/v1/impl/RestApiServiceImpl.java](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&filepath=external-service-impl%2Frest%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fiotdb%2Frest%2Fprotocol%2Fv1%2Fimpl%2FRestApiServiceImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZXh0ZXJuYWwtc2VydmljZS1pbXBsL3Jlc3Qvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2lvdGRiL3Jlc3QvcHJvdG9jb2wvdjEvaW1wbC9SZXN0QXBpU2VydmljZUltcGwuamF2YQ==) | 0.00% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/18149?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #18149 +/- ##
============================================
- Coverage 41.87% 41.52% -0.35%
- Complexity 318 334 +16
============================================
Files 5297 5328 +31
Lines 374093 376417 +2324
Branches 48287 48690 +403
============================================
- Hits 156645 156318 -327
- Misses 217448 220099 +2651
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/iotdb/pull/18149?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org