This is an automated email from the ASF dual-hosted git repository.
justinchen pushed a commit to branch memory-safe
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/memory-safe by this push:
new bd6f280b0f4 test
bd6f280b0f4 is described below
commit bd6f280b0f42417675079f36dbe5d376409aee60
Author: Caideyipi <[email protected]>
AuthorDate: Mon Dec 29 16:25:58 2025 +0800
test
---
.../db/pipe/sink/payload/evolvable/batch/PipeTabletEventBatch.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/batch/PipeTabletEventBatch.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/batch/PipeTabletEventBatch.java
index 0e13feb8ac4..96bddd0d672 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/batch/PipeTabletEventBatch.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/batch/PipeTabletEventBatch.java
@@ -20,6 +20,8 @@
package org.apache.iotdb.db.pipe.sink.payload.evolvable.batch;
import org.apache.iotdb.commons.pipe.event.EnrichedEvent;
+import org.apache.iotdb.db.pipe.resource.PipeDataNodeResourceManager;
+import org.apache.iotdb.db.pipe.resource.memory.PipeMemoryBlock;
import
org.apache.iotdb.db.pipe.sink.protocol.thrift.async.IoTDBDataRegionAsyncSink;
import
org.apache.iotdb.db.storageengine.dataregion.wal.exception.WALPipeException;
import org.apache.iotdb.pipe.api.event.Event;
@@ -45,6 +47,7 @@ public abstract class PipeTabletEventBatch implements
AutoCloseable {
private long firstEventProcessingTime = Long.MIN_VALUE;
protected long totalBufferSize = 0;
+ private final PipeMemoryBlock allocatedMemoryBlock;
protected volatile boolean isClosed = false;
@@ -56,6 +59,8 @@ public abstract class PipeTabletEventBatch implements
AutoCloseable {
// limit in buffer size
this.maxBatchSizeInBytes = requestMaxBatchSizeInBytes;
+ this.allocatedMemoryBlock =
+
PipeDataNodeResourceManager.memory().forceAllocate(requestMaxBatchSizeInBytes);
if (recordMetric != null) {
this.recordMetric = recordMetric;
} else {
@@ -142,6 +147,7 @@ public abstract class PipeTabletEventBatch implements
AutoCloseable {
clearEventsReferenceCount(PipeTabletEventBatch.class.getName());
events.clear();
+ allocatedMemoryBlock.close();
}
/**