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

   ## Description
   
   ### Avoid copying measurements on last cache write path
   
   This PR avoids materializing a copied raw measurement array when 
InsertRow/InsertTablet nodes update last cache. Write nodes pass their existing 
measurements array to cache update APIs, and cache update resolves raw 
measurement names from measurement schemas by index.
   
   ### Preserve alias and failed-column semantics
   
   `TableDeviceLastCache` and tree schema cache now resolve schema raw names 
only when the original measurement slot is still valid, so failed measurements 
remain skipped. `getRawMeasurements()` keeps copy-on-write behavior for callers 
that still need a raw measurement array.
   
   ### Tests
   
   - Added alias regression coverage for tree last cache update.
   - Added coverage for copy-on-write `getRawMeasurements()` behavior.
   
   Validation:
   - `mvn -Ddevelocity.off=true -DspotlessFiles=... -pl iotdb-core/datanode 
spotless:apply`
   - `git diff --check`
   
   `mvn ... test-compile` was attempted but the local workspace fails on 
existing generated Freemarker sources (`IFill`, `Accumulator`, 
`ComparatorChain` resolution), unrelated to this change.
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
       - [ ] concurrent read
       - [ ] concurrent write
       - [ ] concurrent read and write 
   - [ ] 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.
   - [x] 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
   
   - `InsertNode`, `InsertRowNode`, `InsertTabletNode`, 
`RelationalInsertRowNode`, `RelationalInsertTabletNode`
   - `TableDeviceLastCache`, `TableDeviceSchemaCache`, `TableDeviceCacheEntry`, 
`TreeDeviceNormalSchema`
   - `TreeDeviceSchemaCacheManagerTest`, `InsertNodeIsMeasurementFailedTest`


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