[ 
https://issues.apache.org/jira/browse/FLINK-19763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17283125#comment-17283125
 ] 

Kezhu Wang commented on FLINK-19763:
------------------------------------

Hi all, I checked the reverted commit and think it fails because of direct 
memory does not belong to what jmx called "non-heap" memory.

Besides this, {{MetricUtilsTest.testMetaspaceMetricUsageNotStatic}} fails with 
rate 1/5 in IDEA "Repeat Until Failure".

I plan to define a class loader to redefine/reload existing class(say, 
{{MetricUtils}}) to solve both. I pushed a [preview 
work|https://github.com/kezhuw/flink/commit/f5676dcfbe1986e78d8a51434305ddeb1d0fd9fb]
 for evaluation.

In first glance, it seems overkill to resort to define a new class at runtime, 
but actually it performs well(100K runs without failure) and resistant to 
optimization in my opinion.

[~mapohl] [~chesnay] Could I take over this issue if this approach sounds good 
to you ?

> Missing test MetricUtilsTest.testNonHeapMetricUsageNotStatic
> ------------------------------------------------------------
>
>                 Key: FLINK-19763
>                 URL: https://issues.apache.org/jira/browse/FLINK-19763
>             Project: Flink
>          Issue Type: Test
>          Components: Runtime / Metrics
>    Affects Versions: 1.10.2, 1.11.2
>            Reporter: Matthias
>            Priority: Minor
>              Labels: starter
>             Fix For: 1.13.0
>
>
> We have tests for the heap and metaspace to check whether the metric is 
> dynamically generated. The test for the non-heap space is missing. There was 
> a test added in [296107e|https://github.com/apache/flink/commit/296107e] but 
> reverted in [2d86256|https://github.com/apache/flink/commit/2d86256] as it 
> appeared that the test is partially failing.
> We might want to add the test again fixing the issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to