This is an automated email from the ASF dual-hosted git repository.
rong pushed a commit to branch dev/1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/dev/1.3 by this push:
new d72ddb2eb05 Pipe: Fix NPE caused by InsertNodeMemoryEstimator
estimating Binary array length (#15321) (#15369)
d72ddb2eb05 is described below
commit d72ddb2eb05ba147cdaba3aa8dfd583779dc11c9
Author: Zhenyu Luo <[email protected]>
AuthorDate: Mon Apr 21 19:10:45 2025 +0800
Pipe: Fix NPE caused by InsertNodeMemoryEstimator estimating Binary array
length (#15321) (#15369)
(cherry picked from commit a0497b80cbd355eaeea80deefb7079c6894e701d)
---
.../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 1f9a21bfbd2..c6746f13c45 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
@@ -549,6 +549,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)