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

Chesnay Schepler commented on FLINK-4938:
-----------------------------------------

This is intended, to make sure that update is called at least once for every 
view. Otherwise, for short running jobs/tasks no measurement will be reported 
at all. This is inconvenient while debugging and i can already see question on 
the ML asking why my numRecordsIn > 0 but numRecirdsInPerSecond == 0.

> Unnecessary update() call for Views to be removed in ViewUpdater#run()
> ----------------------------------------------------------------------
>
>                 Key: FLINK-4938
>                 URL: https://issues.apache.org/jira/browse/FLINK-4938
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> {code}
>       for (View toUpdate : this.views) {
>         toUpdate.update();
>       }
>       synchronized (lock) {
>         views.addAll(toAdd);
>         toAdd.clear();
>         views.removeAll(toRemove);
> {code}
> For View's in toRemove, update() call is not needed. See earlier javadoc:
> {code}
>    * Notifies this ViewUpdater of a metric that should no longer be regularly 
> updated.
> {code}



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

Reply via email to