Fix show configuration displaying raw value instead of effective value#18108
Open
JackieTien97 wants to merge 1 commit into
Open
Fix show configuration displaying raw value instead of effective value#18108JackieTien97 wants to merge 1 commit into
JackieTien97 wants to merge 1 commit into
Conversation
show configuration (table model) renders ConfigurationFileUtils.lastAppliedProperties, which is populated from the raw config-file values. Several hot-reloaded parameters have setters that rewrite the loaded value (e.g. `if (x > 0) setX(x)` skips non-positive values; loadFixedSizeLimitForQuery rewrites `<=0` to a computed default), so their displayed value diverged from the effective in-memory value. Add overlayEffectiveConfigurationValues() to overwrite those keys with the post-setter effective value, invoked after the setters in both loadProperties (startup) and loadHotModifiedProps (hot-reload), so local and remote show configuration stay correct. Affected keys: cte_buffer_size_in_bytes, max_rows_in_cte_buffer, max_sub_task_num_for_information_table_scan, sort_buffer_size_in_bytes, mods_cache_size_limit_per_fi_in_bytes. Added IT: IoTDBLoadConfigurationTableIT#showConfigurationDisplaysEffectiveValue.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18108 +/- ##
============================================
+ Coverage 41.53% 41.76% +0.23%
Complexity 318 318
============================================
Files 5296 5296
Lines 371679 371957 +278
Branches 48088 48137 +49
============================================
+ Hits 154360 155331 +971
+ Misses 217319 216626 -693 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Problem
show configuration(table model) rendersConfigurationFileUtils.lastAppliedProperties, which is populated from the raw config-file values. Several hot-reloaded parameters have setters that rewrite the loaded value before it takes effect, so their displayed value diverged from the effective in-memory value:if (x > 0) setX(x)skips non-positive values → keeps the default, but the display still showed the raw0/ negative file valueloadFixedSizeLimitForQueryrewrites<=0to a computed default → the display still showed0This affects only the display layer, not actual behavior (the effective value is always correct in memory).
Affected keys:
cte_buffer_size_in_bytes>0guardmax_rows_in_cte_buffer>0guardmax_sub_task_num_for_information_table_scan>0guardsort_buffer_size_in_bytes<=0→ computed default (template default is0, so it was always misdisplayed)mods_cache_size_limit_per_fi_in_bytes<=0→ computed default (template default is0, so it was always misdisplayed)Fix
Add
IoTDBDescriptor.overlayEffectiveConfigurationValues(): after the setters run, overwrite those keys inlastAppliedPropertieswith the post-setter effective value (conf.getX()/commonConfig.getX()). It is invoked in both load paths —loadProperties(startup) andloadHotModifiedProps(hot-reload) — so both localshow configurationandshow configuration node <id>(remote, which reads each node's own map over RPC) stay correct.This is a load-side fix rather than a display-side getter map because remote-node display can only be corrected by fixing each node's stored
lastAppliedProperties.Test
Added
IoTDBLoadConfigurationTableIT#showConfigurationDisplaysEffectiveValue:=0/=-1) → display the effective defaults (131072/1000/4)=262144) → displayed unchanged (no false rewrite)<=0params (template default0) → display a positive computed default, not0Verified: passes with the fix; without the fix the first assertion fails with
expected:<[131072]> but was:<[0]>(so the test is non-vacuous and actually catches the bug).🤖 Generated with Claude Code