GitHub user NicoK opened a pull request:

    [FLINK-8517] fix missing synchronization in TaskEventDispatcher

    ## What is the purpose of the change
    The `TaskEventDispatcher` was missing synchronization accessing the 
`registeredHandlers` field for the new `subscribeToEvent()` and `publish()` 
methods. This was causing the 
`StaticlyNestedIterationsITCase.testJobWithoutObjectReuse()` test to 
sporadically fail (reproducible after running a couple of times).
    Please merge into `master` and `release-1.5` after accepting.
    ## Brief change log
    - add synchronization around `TaskEventDispatcher#subscribeToEvent()`'s 
access to `registeredHandlers`
    - add synchronization around `TaskEventDispatcher#publish()`'s access to 
    ## Verifying this change
    This change is already covered by existing tests (indirectly), such as 
`StaticlyNestedIterationsITCase.testJobWithoutObjectReuse()`. I ran it almost 
24000 times and could not reproduce it anymore with the change
    ## Does this pull request potentially affect one of the following parts:
      - Dependencies (does it add or upgrade a dependency): **no**
      - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: **no**
      - The serializers: **no**
      - The runtime per-record code paths (performance sensitive): **no**
      - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: **no**
      - The S3 file system connector: **no**
    ## Documentation
      - Does this pull request introduce a new feature? **no**
      - If yes, how is the feature documented? **not applicable**

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

    $ git pull flink-8517

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

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

    This closes #5621
commit aabeb89dd1259174c786f19b7e97c4c50038610f
Author: Nico Kruber <nico@...>
Date:   2018-03-02T13:38:20Z

    [FLINK-8517] fix missing synchronization in TaskEventDispatcher



Reply via email to