You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ha...@apache.org on 2024/04/07 02:32:54 UTC

(flink) 02/02: [hotfix] Fix collectSizeStats for SegmentFileStateHandle (#24480)

This is an automated email from the ASF dual-hosted git repository.

hangxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 0b7f0fded3fbd4d4c5d1819c8d7734fe83719808
Author: Hangxiang Yu <ma...@gmail.com>
AuthorDate: Mon Apr 1 12:13:45 2024 +0800

    [hotfix] Fix collectSizeStats for SegmentFileStateHandle (#24480)
---
 .../flink/runtime/state/filemerging/SegmentFileStateHandle.java      | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/state/filemerging/SegmentFileStateHandle.java b/flink-runtime/src/main/java/org/apache/flink/runtime/state/filemerging/SegmentFileStateHandle.java
index 9c5d5a47caf..6522f55c429 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/state/filemerging/SegmentFileStateHandle.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/state/filemerging/SegmentFileStateHandle.java
@@ -109,6 +109,11 @@ public class SegmentFileStateHandle implements StreamStateHandle {
         return stateSize;
     }
 
+    @Override
+    public void collectSizeStats(StateObjectSizeStatsCollector collector) {
+        collector.add(StateObjectLocation.REMOTE, getStateSize());
+    }
+
     public CheckpointedStateScope getScope() {
         return scope;
     }