CRZbulabula opened a new pull request, #17933: URL: https://github.com/apache/iotdb/pull/17933
## Description `enable_topology_probing` (added in #17595) is declared `effectiveMode: hot_reload` in the config template and the ConfigNode already implements the hot-reload start/stop logic (`ConfigManager.handleTopologyProbingHotReload`). However, `set configuration "enable_topology_probing"="true"` was rejected with: ``` 301: ignored config items: [enable_topology_probing] because they are immutable or undefined. ``` so the advertised hot-reload entry point was effectively dead — operators could only toggle the TopologyService by editing the config file and restarting the ConfigNode (which triggers a leader election and a brief availability hit). ### Root cause In `iotdb-system.properties.template` the item was left **commented out**: ``` # Whether to enable topology probing between DataNodes # effectiveMode: hot_reload # Datatype: Boolean # enable_topology_probing=false ``` `ConfigurationFileUtils.getConfigurationItemsFromTemplate` only parses **uncommented** `key=value` lines into `configuration2DefaultValue`. Because this line was commented, the key never entered the default-value map, so `filterInvalidConfigItems` treated it as `undefined` and dropped it **before** it could reach the hot-reload path. For comparison, the other working `hot_reload` item `slow_query_threshold` is present in the template as a bare (uncommented) default. ### Fix Uncomment the item so it becomes a bare default like every other working `hot_reload` item: ```diff -# enable_topology_probing=false +enable_topology_probing=false ``` The entire downstream chain (`filterInvalidConfigItems` → `updateConfiguration` → `loadHotModifiedProps` → `handleTopologyProbingHotReload`) was already correct; the only thing blocking it was the commented template line. No Java logic changes are required. ### Tests - **`ConfigurationFileUtilsTest.checkHotReloadItemsAreUncommentedInTemplate`** — a regression guard that scans the raw template and fails if any `hot_reload` item is left commented out. It tolerates keys that also have an uncommented variant elsewhere (e.g. the Windows/Unix path pairs such as `dn_data_dirs`, `load_active_listening_dirs`, `load_active_listening_fail_dir`), so it only flags items that are genuinely unreachable. - **`IoTDBSetConfigurationIT.testSetHotReloadTopologyProbing`** — end-to-end: asserts `set configuration "enable_topology_probing"="true"` succeeds (no longer rejected) and is persisted to the ConfigNode config file. <hr> This PR has: - [x] been self-reviewed. - [x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage. - [x] added integration tests. <hr> ##### Key changed/added classes (or packages if there are too many classes) in this PR - `iotdb-system.properties.template` (node-commons config template) - `ConfigurationFileUtilsTest` (datanode unit test) - `IoTDBSetConfigurationIT` (integration test) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
