You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ji...@apache.org on 2025/11/26 07:14:33 UTC

(iotdb) branch cp_measurement_check created (now 7c299646874)

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

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


      at 7c299646874 Add a judgment in order to avoid occur NPE when one value of measurementSchemas is null (#15574)

This branch includes the following new commits:

     new 7c299646874 Add a judgment in order to avoid occur NPE when one value of measurementSchemas is null (#15574)

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: Add a judgment in order to avoid occur NPE when one value of measurementSchemas is null (#15574)

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

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

commit 7c29964687475ee05fd88a2c09cedf7dba5a7a84
Author: libo <ze...@163.com>
AuthorDate: Mon May 26 11:31:24 2025 +0800

    Add a judgment in order to avoid occur NPE when one value of measurementSchemas is null (#15574)
---
 .../iotdb/db/pipe/resource/memory/InsertNodeMemoryEstimator.java      | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/InsertNodeMemoryEstimator.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/InsertNodeMemoryEstimator.java
index 410ac5376c9..c29eb15371c 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/InsertNodeMemoryEstimator.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/InsertNodeMemoryEstimator.java
@@ -574,6 +574,10 @@ public class InsertNodeMemoryEstimator {
         RamUsageEstimator.alignObjectSize(
             NUM_BYTES_ARRAY_HEADER + NUM_BYTES_OBJECT_REF * values.length);
     for (int i = 0; i < values.length; i++) {
+      if (measurementSchemas[i] == null || measurementSchemas[i].getType() == null) {
+        size += NUM_BYTES_OBJECT_HEADER;
+        continue;
+      }
       switch (measurementSchemas[i].getType()) {
         case INT64:
         case TIMESTAMP: