flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-6007) ConcurrentModificationException in WatermarkCallbackService
Date Mon, 13 Mar 2017 12:33:41 GMT

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

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

Github user aljoscha commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3514#discussion_r105648422
  
    --- Diff: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/InternalWatermarkCallbackService.java
---
    @@ -58,7 +59,17 @@
     	 * An array of sets of keys keeping the registered keys split
     	 * by the key-group they belong to. Each key-group has one set.
     	 */
    -	private final Set<K>[] keysByKeygroup;
    +	private final Set<K>[] registeredKeysByKeyGroup;
    +
    +	/**
    +	 * An array of sets of keys keeping the keys "to delete" split
    +	 * by the key-group they belong to. Each key-group has one set.
    +	 * <p>
    --- End diff --
    
    IMHO, the formatting on paragraphs should be:
    ```
    Some text bla bla black
    
    <p>Other Text sdfasfaf
    ```
    
    on the other hand, we don't have a style guide on that and no checkstyle for checking
it .... 😉 


> 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)

Mime
View raw message