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

Konstantin Knauf commented on FLINK-3669:
-----------------------------------------

Hi Aljoscha, 

I think there is more to it, although this would definitely mitigate the 
problem. Even if we only registered one timer per second. We would still create 
a lot of TriggerTasks, which do not get cleaned up, when 
TriggerContext.deleteProcessingTimeTimer is invoked. This could still lead to 
GC problems, if the trigger is far in the future. 

When calling deleteProcessingTimerTimer shouldn't the ScheduledFuture for this 
timer be canceled, which together with 
ScheduledThreadPoolExecutor.setRemoveOnCancelPolicy(true) would remove the 
TriggerTask from the ExecutorService and let GC do the cleanup?

Cheers, 

Konstantin

> WindowOperator registers a log of timers at StreamTask
> ------------------------------------------------------
>
>                 Key: FLINK-3669
>                 URL: https://issues.apache.org/jira/browse/FLINK-3669
>             Project: Flink
>          Issue Type: Bug
>          Components: Streaming
>    Affects Versions: 1.0.1
>            Reporter: Aljoscha Krettek
>            Priority: Blocker
>
> Right now, the WindowOperator registers a timer at the StreamTask for every 
> processing-time timer that a Trigger registers. We should combine several 
> registered trigger timers to only register one low-level timer (timer 
> coalescing).



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

Reply via email to