This is an automated email from the ASF dual-hosted git repository.
jackietien 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 0843ffa856 Fix MemoryPool free NPE
0843ffa856 is described below
commit 0843ffa8569ca3373797b1c2ffd09e6bc21a476e
Author: Jackie Tien <[email protected]>
AuthorDate: Wed Apr 12 17:29:17 2023 +0800
Fix MemoryPool free NPE
---
.../org/apache/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 1b027ba2ab..fd11f74990 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 class SinkChannel implements ISinkChannel {
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 class SinkChannel implements ISinkChannel {
// 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