GitHub user NicoK opened a pull request: https://github.com/apache/flink/pull/5747
[FLINK-9057][network] fix an NPE when cleaning up before requesting a subpartition view ## What is the purpose of the change In `PartitionRequestServerHandler`, the view reader is created and immediately afterwards added to the `PartitionRequestQueue` which would attempt a cleanup of the view reader's subpartition view. This view, however, is currently only created after adding the reader to the `PartitionRequestQueue` and may thus result in a `NullPointerException` if the cleanup happens very early in the initialization phase, e.g. due to failures. ## Brief change log - call `NetworkSequenceViewReader#requestSubpartitionView` before calling `PartitionRequestQueue#notifyReaderCreated()` ## Verifying this change This change is a trivial rework / code cleanup without any test coverage. ## 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 https://github.com/NicoK/flink flink-9057 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/5747.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 #5747 ---- commit 3a34531f8d5fd2c4e71102f2d9d66105e55eb697 Author: Nico Kruber <nico@...> Date: 2018-03-22T12:49:45Z [hotfix][tests] add a name to the parameter of RescalingITCase commit 2e909f085bbc90f406eeae16efda15254c296c0e Author: Nico Kruber <nico@...> Date: 2018-03-22T12:50:07Z [FLINK-9057][network] fix an NPE when cleaning up before requesting a subpartition view ---- ---