You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by zy...@apache.org on 2023/03/30 08:33:23 UTC

[iotdb] branch master updated: [IOTDB-5675] Recover template activation statistics when redoing MLog (#9483)

This is an automated email from the ASF dual-hosted git repository.

zyk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 810bf11dfe [IOTDB-5675] Recover template activation statistics when redoing MLog (#9483)
810bf11dfe is described below

commit 810bf11dfe9f619114d9f530ed1dadec3a251b2f
Author: Chen YZ <43...@users.noreply.github.com>
AuthorDate: Thu Mar 30 16:33:15 2023 +0800

    [IOTDB-5675] Recover template activation statistics when redoing MLog (#9483)
---
 .../java/org/apache/iotdb/db/metadata/mtree/MTreeBelowSGCachedImpl.java  | 1 +
 .../java/org/apache/iotdb/db/metadata/mtree/MTreeBelowSGMemoryImpl.java  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/mtree/MTreeBelowSGCachedImpl.java b/server/src/main/java/org/apache/iotdb/db/metadata/mtree/MTreeBelowSGCachedImpl.java
index 9425a102a9..276161bce5 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/mtree/MTreeBelowSGCachedImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/mtree/MTreeBelowSGCachedImpl.java
@@ -890,6 +890,7 @@ public class MTreeBelowSGCachedImpl {
       entityMNode.setSchemaTemplateId(templateId);
 
       store.updateMNode(entityMNode.getAsMNode());
+      regionStatistics.activateTemplate(templateId);
     } finally {
       unPinPath(cur);
     }
diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/mtree/MTreeBelowSGMemoryImpl.java b/server/src/main/java/org/apache/iotdb/db/metadata/mtree/MTreeBelowSGMemoryImpl.java
index 9d03f3075e..58838178cc 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/mtree/MTreeBelowSGMemoryImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/mtree/MTreeBelowSGMemoryImpl.java
@@ -810,6 +810,7 @@ public class MTreeBelowSGMemoryImpl {
     }
     entityMNode.setUseTemplate(true);
     entityMNode.setSchemaTemplateId(templateId);
+    regionStatistics.activateTemplate(templateId);
   }
 
   public long countPathsUsingTemplate(PartialPath pathPattern, int templateId)