Uh oh!
There was an error while loading. Please reload this page.
Optimize the configuration logic of dn_thrift_max_frame_size - #16724
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request refactors the Thrift max frame size configuration to use dynamic memory-based defaults and consolidates frame validation error handling.
Key Changes
- Removed hardcoded
LEFT_SIZE_IN_REQUESTconstant and related validation logic - Changed default
dn_thrift_max_frame_sizefrom 512MB to 0 (dynamic), which calculates as min(64MB, heap memory / 64) - Refactored frame size validation in
TElasticFramedTransportusing an enum-based error handling pattern
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| IoTDBConstant.java | Removed unused LEFT_SIZE_IN_REQUEST constant (4MB) |
| iotdb-system.properties.template | Updated default value to 0 and clarified documentation for dynamic calculation |
| IoTDBDescriptor.java | Removed minimum frame size validation that enforced 8MB minimum |
| IoTDBConfig.java | Implemented dynamic calculation of thriftMaxFrameSize based on heap memory, with fallback logic in setter |
| TElasticFramedTransport.java | Refactored frame validation into checkFrameSize() method with enum-based error handling for better code organization |
| TCompressedElasticFramedTransport.java | Simplified by delegating frame size validation to parent class's checkFrameSize() method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## master #16724 +/- ##
============================================
- Coverage 38.75% 38.75% -0.01%
Complexity 207 207 ============================================
Files 5001 5001 Lines 331342 331356 +14 Branches 42103 42102 -1 ============================================
+ Hits 128421 128426 +5 - Misses 202921 202930 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Uh oh!
There was an error while loading. Please reload this page.
* Add thrift max frame size calculate logic * Add thrift max frame size calculate logic * fix review (cherry picked from commit ffa9c56)



Description