xiangmy21 commented on code in PR #17065:
URL: https://github.com/apache/iotdb/pull/17065#discussion_r2734536845
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/MTreeBelowSGMemoryImpl.java:
##########
@@ -192,6 +193,22 @@ public synchronized boolean createSnapshot(final File
snapshotDir) {
return store.createSnapshot(snapshotDir);
}
+ private void applySubtreeMeasurementDelta(IMemMNode startNode, final long
delta) {
+ if (delta == 0 || startNode == null) {
+ return;
+ }
+ IMemMNode current = startNode;
+ while (current != null) {
+ current.setSubtreeMeasurementCount(current.getSubtreeMeasurementCount()
+ delta);
+ current = current.getParent();
+ }
+ }
+
+ private long getTemplateMeasurementCount(final int templateId) {
+ final Template template =
ClusterTemplateManager.getInstance().getTemplate(templateId);
+ return template == null ? 0L : template.getMeasurementNumber();
Review Comment:
Great catch! I fixed this issue in commit
[4027f97](https://github.com/apache/iotdb/pull/17065/commits/4027f9724ad417771b64eff82a53c90180a47297).
When a template is modified, the update is broadcast to the corresponding
SchemaRegion, and the subtree statistics are updated upward from the nodes
activated by the template in the MTree.
--
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]