HTHou commented on code in PR #17955:
URL: https://github.com/apache/iotdb/pull/17955#discussion_r3425282272
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/schemafile/pagemgr/PageManager.java:
##########
@@ -305,6 +303,19 @@ private void writeUpdatedChildren(ICachedMNode node,
SchemaPageContext cxt)
entry.getKey()));
}
+ if (!child.isMeasurement() && getNodeAddress(child) < 0) {
+ if (child.isDevice() && child.getAsDeviceMNode().isUseTemplate()) {
Review Comment:
Could you clarify why the updated-child path rejects using-template devices
here? `writeNewChildren()` allocates a segment for non-measurement children
without this check, while this path will now fail if an updated template device
still has a negative address. If the invariant is that such nodes can never
reach this branch, a regression test or a short comment would make that clear;
otherwise this should probably follow the new-child allocation behavior and use
the existing i18n message for any real template-child write rejection.
--
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]