From 1188c516d61ca6af5f2965b8a31a464ee22858db Mon Sep 17 00:00:00 2001 From: JackieTien97 Date: Wed, 12 Apr 2023 12:30:23 +0800 Subject: [PATCH] Fix MemoryPool free NPE --- .../iotdb/db/mpp/execution/exchange/sink/SinkChannel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/execution/exchange/sink/SinkChannel.java b/server/src/main/java/org/apache/iotdb/db/mpp/execution/exchange/sink/SinkChannel.java index 1b027ba2ab646..fd11f749908d1 100644 --- a/server/src/main/java/org/apache/iotdb/db/mpp/execution/exchange/sink/SinkChannel.java +++ b/server/src/main/java/org/apache/iotdb/db/mpp/execution/exchange/sink/SinkChannel.java @@ -138,7 +138,7 @@ public SinkChannel( localFragmentInstanceId.queryId, localFragmentInstanceId.fragmentId, localFragmentInstanceId.instanceId); - this.bufferRetainedSizeInBytes = DEFAULT_MAX_TSBLOCK_SIZE_IN_BYTES; + this.bufferRetainedSizeInBytes = 0; this.currentTsBlockSize = DEFAULT_MAX_TSBLOCK_SIZE_IN_BYTES; localMemoryManager .getQueryPool() @@ -385,6 +385,7 @@ public synchronized void open() { // the handle is created, so we use DEFAULT here. It is ok to use DEFAULT here because // at first this SinkChannel has not reserved memory. .left; + this.bufferRetainedSizeInBytes = DEFAULT_MAX_TSBLOCK_SIZE_IN_BYTES; } @Override