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

jiangtian 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 82f2dc4c320 Fixed the configMTree deserialisation bug for "root" 
database (#16961)
82f2dc4c320 is described below

commit 82f2dc4c3206bd907c78007006764c1917eb7d60
Author: Caideyipi <[email protected]>
AuthorDate: Tue Dec 30 11:46:00 2025 +0800

    Fixed the configMTree deserialisation bug for "root" database (#16961)
---
 .../org/apache/iotdb/confignode/persistence/schema/ConfigMTree.java   | 4 +---
 .../apache/iotdb/confignode/persistence/schema/ConfigMTreeTest.java   | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTree.java
 
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTree.java
index 36c4ccc2f05..a4231e5db83 100644
--- 
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTree.java
+++ 
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTree.java
@@ -1109,15 +1109,13 @@ public class ConfigMTree {
       name = tableNode.getName();
       stack.push(new Pair<>(tableNode, false));
     } else {
-      // Currently internal mNode will not be the leaf node and thus will not 
be deserialized here
-      // This is just in case
       internalMNode = deserializeInternalMNode(inputStream);
       ReadWriteIOUtils.readInt(inputStream);
       name = internalMNode.getName();
       stack.push(new Pair<>(internalMNode, false));
     }
 
-    while (!PATH_ROOT.equals(name)) {
+    while (!PATH_ROOT.equals(name) || type != INTERNAL_MNODE_TYPE) {
       type = ReadWriteIOUtils.readByte(inputStream);
       switch (type) {
         case INTERNAL_MNODE_TYPE:
diff --git 
a/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTreeTest.java
 
b/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTreeTest.java
index 0e887886dcc..7e5f2d5c239 100644
--- 
a/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTreeTest.java
+++ 
b/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/persistence/schema/ConfigMTreeTest.java
@@ -261,7 +261,7 @@ public class ConfigMTreeTest {
   public void testSerialization() throws Exception {
     final PartialPath[] pathList =
         new PartialPath[] {
-          new PartialPath("root.sg"),
+          new PartialPath("root.`root`"),
           new PartialPath("root.a.sg"),
           new PartialPath("root.a.b.sg"),
           new PartialPath("root.a.a.b.sg")

Reply via email to