You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2023/05/12 04:01:34 UTC

[iotdb] branch optimize_measurementid_serialize created (now b0e87154156)

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

haonan pushed a change to branch optimize_measurementid_serialize
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at b0e87154156 Optimize measurementId serialization in WAL

This branch includes the following new commits:

     new b0e87154156 Optimize measurementId serialization in WAL

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: Optimize measurementId serialization in WAL

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b0e871541566ad08b4428bb7b6a1518f39d4b4dd
Author: HTHou <hh...@outlook.com>
AuthorDate: Fri May 12 12:00:38 2023 +0800

    Optimize measurementId serialization in WAL
---
 server/src/main/java/org/apache/iotdb/db/wal/utils/WALWriteUtils.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/wal/utils/WALWriteUtils.java b/server/src/main/java/org/apache/iotdb/db/wal/utils/WALWriteUtils.java
index 5eb016ced79..0e7a73d5f6b 100644
--- a/server/src/main/java/org/apache/iotdb/db/wal/utils/WALWriteUtils.java
+++ b/server/src/main/java/org/apache/iotdb/db/wal/utils/WALWriteUtils.java
@@ -124,7 +124,8 @@ public class WALWriteUtils {
       return write(NO_BYTE_TO_READ, buffer);
     }
     int len = 0;
-    byte[] bytes = s.getBytes();
+    byte[] bytes = new byte[s.length()];
+    s.getBytes(0, s.length(), bytes, 0);
     len += write(bytes.length, buffer);
     buffer.put(bytes);
     len += bytes.length;