FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add REST write request size and batch limits by HTHou · Pull Request #17481 · apache/iotdb · GitHub

/ iotdb Public

Add REST write request size and batch limits - #17481

Merged
HTHou merged 9 commits into
masterfrom
codex/rest-api
Jul 22, 2026
Merged

Add REST write request size and batch limits#17481
HTHou merged 9 commits into
masterfrom
codex/rest-api

Conversation

HTHou commented Apr 15, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Summary

  • add configurable REST request limits for body size, row count, column count, and total values
  • reject oversized request bodies early with a pre-matching filter and return HTTP 413 for per-request body limit violations
  • add a REST in-flight request body memory quota and return HTTP 503 when concurrent request bodies exceed the quota
  • align the REST concurrent request body budget with Thrift AutoResizingBuffer memory control: 0 uses the same auto budget calculation, while a negative value disables the total quota
  • enforce write batch limits across REST v1, v2, and table APIs during request validation
  • update REST exception handling to preserve 413 responses instead of always returning HTTP 200
  • document the new REST configuration properties in system property templates and test resources

Testing

  • mvn spotless:apply -pl iotdb-core/datanode
  • mvn spotless:apply -pl external-service-impl/rest
  • mvn test -pl iotdb-core/datanode -am -Dtest=DataNodeMemoryConfigTest -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false
  • mvn test -pl external-service-impl/rest -am -Dtest=RequestSizeLimitFilterTest,RequestValidationLimitTest -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false
  • mvn test-compile -P with-zh-locale -pl external-service-impl/rest -am -DskipTests

Copy link
Copy Markdown

Quality Gate failed

Failed conditions
18.9% Duplication on New Code (required ≤ 5%)

See analysis details on SonarQube Cloud

codecov Bot commented Apr 15, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.10112% with 110 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.92%. Comparing base (f2dd701) to head (2ee9e33).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
.../protocol/v2/handler/RequestValidationHandler.java 44.82% 16 Missing ⚠️
...otdb/rest/protocol/v2/impl/RestApiServiceImpl.java 0.00% 15 Missing ⚠️
...est/protocol/table/v1/impl/RestApiServiceImpl.java 0.00% 12 Missing ⚠️
...b/rest/protocol/filter/RequestSizeLimitFilter.java 87.67% 9 Missing ⚠️
.../protocol/v1/handler/RequestValidationHandler.java 40.00% 9 Missing ⚠️
...b/rest/protocol/v1/impl/GrafanaApiServiceImpl.java 0.00% 9 Missing ⚠️
...otdb/rest/protocol/v1/impl/RestApiServiceImpl.java 0.00% 9 Missing ⚠️
...b/rest/protocol/v2/impl/GrafanaApiServiceImpl.java 0.00% 9 Missing ⚠️
...st/protocol/table/v1/handler/ExceptionHandler.java 0.00% 5 Missing ⚠️
...tdb/rest/protocol/v1/handler/ExceptionHandler.java 0.00% 5 Missing ⚠️
... and 5 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17481      +/-   ##
============================================
+ Coverage     42.71%   42.92%   +0.20%     
- Complexity      343      374      +31     
============================================
  Files          5356     5361       +5     
  Lines        380693   381042     +349     
  Branches      49415    49460      +45     
============================================
+ Hits         162632   163575     +943     
+ Misses       218061   217467     -594     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

HTHou merged commit 4bc2fd5 into master Jul 22, 2026
39 of 41 checks passed
HTHou deleted the codex/rest-api branch July 22, 2026 10:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL