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

ASF GitHub Bot commented on FLINK-6007:
---------------------------------------

GitHub user kl0u opened a pull request:

    https://github.com/apache/flink/pull/3514

    [FLINK-6007] Allow key removal from within the watermark callback.

    When deleting a key from the InternalWatermarkCallbackService, the
    deleted key is put into a separate set, and the actual deletion
    happens after the iteration over all keys has finished. To avoid
    checkpointing the deletion set, the actual cleanup also happens
    upon checkpointing.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kl0u/flink watermark-callback-fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/3514.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3514
    
----
commit d3a1b6e72eb56db40638c0b0889f5277c4671b61
Author: kl0u <[email protected]>
Date:   2017-03-08T19:18:18Z

    [FLINK-6007] Allow key removal from within the watermark callback.
    
    When deleting a key from the InternalWatermarkCallbackService, the
    deleted key is put into a separate set, and the actual deletion
    happens after the iteration over all keys has finished. To avoid
    checkpointing the deletion set, the actual cleanup also happens
    upon checkpointing.

----


> ConcurrentModificationException in WatermarkCallbackService
> -----------------------------------------------------------
>
>                 Key: FLINK-6007
>                 URL: https://issues.apache.org/jira/browse/FLINK-6007
>             Project: Flink
>          Issue Type: Bug
>          Components: DataStream API
>    Affects Versions: 1.3.0
>            Reporter: Kostas Kloudas
>            Assignee: Kostas Kloudas
>            Priority: Blocker
>             Fix For: 1.3.0
>
>
> Currently, if an attempt is made to call 
> {{InternalWatermarkCallbackService.unregisterKeyFromWatermarkCallback()}} 
> from within the {{OnWatermarkCallback}}, a 
> {{ConcurrentModificationException}} is thrown. The reason is that the 
> {{invokeOnWatermarkCallback}} iterates over the list of keys and calls the 
> callback for each one of them.
> To fix this, the deleted keys are put into a separate list, and the deletion 
> happens after the iteration over all keys has finished.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to