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

rong 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 a0497b80cbd Pipe: Fix NPE caused by InsertNodeMemoryEstimator 
estimating Binary array length (#15321)
a0497b80cbd is described below

commit a0497b80cbd355eaeea80deefb7079c6894e701d
Author: Zhenyu Luo <[email protected]>
AuthorDate: Thu Apr 17 12:22:43 2025 +0800

    Pipe: Fix NPE caused by InsertNodeMemoryEstimator estimating Binary array 
length (#15321)
---
 .../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 b6e28a22508..2f78b092744 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
@@ -646,6 +646,10 @@ public class InsertNodeMemoryEstimator {
   }
 
   private static long getBinarySize(final Binary[] binaries) {
+    if (binaries == null) {
+      return 0L;
+    }
+
     return RamUsageEstimator.shallowSizeOf(binaries)
         + Arrays.stream(binaries)
             .mapToLong(InsertNodeMemoryEstimator::sizeOfBinary)

Reply via email to