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

   ## Description
   
   ### Root cause
   
   Schema snapshot deserialization tracked the current table name only when a 
database child was an internal node or a table-device node. In legacy 
mixed-model metadata, the table-name node can also be a tree-model device. A 
nested table device was therefore restored with a null table name, causing an 
NPE in table-device statistics recovery and preventing the DataNode from 
starting.
   
   ### Fix
   
   - Track the current table name for every direct child of the database root.
   - Recover table-device statistics only after that table name has been 
updated.
   - Add a regression test that snapshots and restores a table device below a 
top-level tree-model device.
   
   ### Verification
   
   - mvn spotless:apply -pl iotdb-core/datanode
   - mvn test -pl iotdb-core/datanode -Dtest=SchemaRegionManagementTest
     - 24 tests run, 0 failures, 0 errors, 4 existing performance tests skipped
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [x] added comments explaining the why and intent where it is not obvious.
   - [x] added unit tests to cover the new code path.
   
   <hr>
   
   ##### Key changed/added classes
   
   - MemMTreeSnapshotUtil
   - SchemaRegionManagementTest


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