This is an automated email from the ASF dual-hosted git repository. rong pushed a commit to branch fix-pipe-insertnode-oom in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 2b53767313df7acd5eb104ef6641ed5f6192ec99 Author: Steve Yurong Su <[email protected]> AuthorDate: Thu Nov 21 16:16:54 2024 +0800 Update StateProgressIndex.java --- .../iotdb/commons/consensus/index/impl/StateProgressIndex.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/impl/StateProgressIndex.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/impl/StateProgressIndex.java index b6c51665e19..00a3e4dce87 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/impl/StateProgressIndex.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/consensus/index/impl/StateProgressIndex.java @@ -252,7 +252,10 @@ public class StateProgressIndex extends ProgressIndex { + RamUsageEstimator.HASHTABLE_RAM_BYTES_PER_ENTRY * state.size() + state.entrySet().stream() .map( - entry -> RamUsageEstimator.sizeOf(entry.getKey()) + entry.getValue().ramBytesUsed()) + entry -> + RamUsageEstimator.sizeOf(entry.getKey()) + + RamUsageEstimator.shallowSizeOf( + entry.getValue() != null ? entry.getValue().getValues() : null)) .reduce(0L, Long::sum); } }
