You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Chesnay Schepler (JIRA)" <ji...@apache.org> on 2017/01/11 15:23:58 UTC

[jira] [Commented] (FLINK-5449) Time drift in MetricRegistry

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

Chesnay Schepler commented on FLINK-5449:
-----------------------------------------

I'm not so sure about this.

scheduledWithFixedDelay ensures that there is a time when no reporter is active, which is a useful safety guarantee since locking is involved.

scheduledWIthFixedRate has a nasty edge case where the action takes longer than the configured period. This causes the reporting actions to queue up, meaning that the reporter will immediately report again after the last report which is troublesome since some reporters require a lock on the registered metrics. By looping you may prevent a task from deploying/cleaning up since neither can new metrics be added nor removed (for some undefined time).



> Time drift in MetricRegistry
> ----------------------------
>
>                 Key: FLINK-5449
>                 URL: https://issues.apache.org/jira/browse/FLINK-5449
>             Project: Flink
>          Issue Type: Bug
>          Components: Metrics
>    Affects Versions: 1.2.0, 1.1.4, 1.3.0
>            Reporter: Andrey
>
> Scheduled metrics are executed using "scheduleWithFixedDelay" which introduces time drift. See http://stackoverflow.com/questions/24649842/scheduleatfixedrate-vs-schedulewithfixeddelay for details.
> Expected:
>  
>  * switch to "scheduleatfixedrate"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)