wangchao316 commented on code in PR #9484:
URL: https://github.com/apache/iotdb/pull/9484#discussion_r1152961613


##########
server/src/test/java/org/apache/iotdb/db/metadata/mtree/schemafile/SchemaFileTest.java:
##########
@@ -504,6 +504,55 @@ public void testUpdateOnFullPageSegment() throws 
MetadataException, IOException
     sf.close();
   }
 
+  /**
+   * This test case is designed to examine a scenario in which, every time a 
SegmentedPage inserts a
+   * record, the process of checking whether there is enough space in the 
segment takes into account
+   * not only the size of the record's buffer, but also the size of the key 
and related pointers.
+   *
+   * @throws Exception
+   */
+  @Test
+  public void testEstimateSegSizeWithBigName() throws Exception {
+    IMNode sgNode = new StorageGroupMNode(null, "mma", 111111111L);
+    IMNode d1 =
+        fillChildren(
+            sgNode,
+            300,
+            "device中文abcdefahiklmnoparstuwwxyz1ABCDEFGHUKLMNOPORSTUVWXYZ",

Review Comment:
   Chinese characters are not recommended. Garbled characters are easy to be 
displayed.



##########
server/src/test/java/org/apache/iotdb/db/metadata/mtree/schemafile/SchemaFileTest.java:
##########
@@ -504,6 +504,55 @@ public void testUpdateOnFullPageSegment() throws 
MetadataException, IOException
     sf.close();
   }
 
+  /**
+   * This test case is designed to examine a scenario in which, every time a 
SegmentedPage inserts a
+   * record, the process of checking whether there is enough space in the 
segment takes into account
+   * not only the size of the record's buffer, but also the size of the key 
and related pointers.
+   *
+   * @throws Exception
+   */
+  @Test
+  public void testEstimateSegSizeWithBigName() throws Exception {
+    IMNode sgNode = new StorageGroupMNode(null, "mma", 111111111L);
+    IMNode d1 =
+        fillChildren(
+            sgNode,
+            300,
+            "device中文abcdefahiklmnoparstuwwxyz1ABCDEFGHUKLMNOPORSTUVWXYZ",
+            this::supplyEntity);
+    ISchemaFile sf = SchemaFile.initSchemaFile("root.sg", 
TEST_SCHEMA_REGION_ID);
+
+    try {
+      fillChildren(d1, 19, "ss1", this::supplyMeasurement);
+
+      sf.writeMNode(sgNode);
+
+      fillChildren(
+          d1,
+          2,
+          
"sensor2中文abcdefahiklmnoparstuwwxyz1ABCDEFGHUKLMNOPORSTUVWXYZPORSTUVWXYZ",

Review Comment:
   Chinese characters are not recommended. Garbled characters are easy to be 
displayed.



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