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

   ## Description
   
   This PR fixes Sonar warnings in load-related code by:
   
   - replacing a Map get/null/put pattern with computeIfAbsent in load routing.
   - checking Optional presence before accessing TsFileResource start/end times.
   - reusing a guarded ActiveLoadEntry value instead of repeated Optional.get() 
calls.
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods.
   - [ ] added or updated version, __license__, or notice information
   - [ ] added comments explaining the why and the intent of the code wherever 
would not be obvious for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for code coverage.
   - [ ] added integration tests.
   - [ ] been tested in a test IoTDB cluster.
   
   <hr>
   
   ##### Key changed/added classes (or packages if there are too many classes) 
in this PR
   
   - LoadSingleTsFileNode
   - LoadTsFileScheduler
   - ActiveLoadTsFileLoader
   
   ##### Tests
   
   - mvn '-Ddevelocity.off=true' spotless:check -pl iotdb-core/datanode
   - git diff --check


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