This is an automated email from the ASF dual-hosted git repository.
tanxinyu 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 b2bacd3f284 Fix Memory Statistic in TimePartionInfoManager (#15073)
b2bacd3f284 is described below
commit b2bacd3f284b365885f2fae6b56f18964c613942
Author: ZhangHongYin <[email protected]>
AuthorDate: Wed Mar 12 20:27:12 2025 +0800
Fix Memory Statistic in TimePartionInfoManager (#15073)
* add error log
* Remove Bytes
* force allocate 8
* remove one more bytes
---
.../iotdb/db/storageengine/rescon/memory/TimePartitionManager.java | 4 ++--
.../src/main/java/org/apache/iotdb/commons/memory/IMemoryBlock.java | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/TimePartitionManager.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/TimePartitionManager.java
index 30771e3db78..2381d15296c 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/TimePartitionManager.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/memory/TimePartitionManager.java
@@ -125,7 +125,7 @@ public class TimePartitionManager {
if (timePartitionInfo == null) {
return;
}
- timePartitionInfoMemoryBlock.release(timePartitionInfo.memSize +
Long.BYTES);
+ timePartitionInfoMemoryBlock.release(timePartitionInfo.memSize);
DataRegion dataRegion =
StorageEngine.getInstance().getDataRegion(timePartitionInfo.dataRegionId);
if (dataRegion != null) {
@@ -151,7 +151,7 @@ public class TimePartitionManager {
if (timePartitionInfoMapForRegion != null) {
for (TimePartitionInfo timePartitionInfo :
timePartitionInfoMapForRegion.values()) {
if (timePartitionInfo != null) {
- timePartitionInfoMemoryBlock.release(timePartitionInfo.memSize +
Long.BYTES);
+ timePartitionInfoMemoryBlock.release(timePartitionInfo.memSize);
}
}
}
diff --git
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/IMemoryBlock.java
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/IMemoryBlock.java
index 332e82336ac..416516bf2c7 100644
---
a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/IMemoryBlock.java
+++
b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/IMemoryBlock.java
@@ -19,8 +19,6 @@
package org.apache.iotdb.commons.memory;
-import org.apache.iotdb.commons.utils.TestOnly;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -88,7 +86,6 @@ public abstract class IMemoryBlock implements AutoCloseable {
*
* @param usedMemoryInBytes the memory usage in byte to be set
*/
- @TestOnly
public abstract void setUsedMemoryInBytes(final long usedMemoryInBytes);
/** Get the memory usage in byte of this memory block */