CRZbulabula opened a new pull request, #18326:
URL: https://github.com/apache/iotdb/pull/18326

   ## Description
   
   The disk_space_warning_threshold configuration is required to be in [0, 1), 
but Double.parseDouble accepts NaN and all range comparisons with NaN return 
false. As a result, a hot reload can apply NaN to ConfigNode and DataNode, 
causing disk checks to move nodes into ReadOnly(DiskFull).
   
   This PR rejects all non-finite values before applying the threshold. It also 
adds NaN to the existing invalid-value unit test and verifies that rejected 
values do not mutate the current configuration.
   
   ## Test
   
   - mvn spotless:apply -pl iotdb-core/node-commons
   - mvn test -pl iotdb-core/node-commons -am 
-Dtest=CommonDescriptorDiskSpaceWarningThresholdTest 
-Dsurefire.failIfNoSpecifiedTests=false
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [x] added or updated unit tests to cover the new code path.
   
   <hr>
   
   ##### Key changed classes in this PR
   
   - CommonDescriptor
   - CommonDescriptorDiskSpaceWarningThresholdTest


-- 
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]

Reply via email to