[
https://issues.apache.org/jira/browse/FLINK-8642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16362326#comment-16362326
]
ASF GitHub Bot commented on FLINK-8642:
---------------------------------------
GitHub user kl0u opened a pull request:
https://github.com/apache/flink/pull/5477
[FLINK-8642] Initialize descriptors before use at getBroadcastState().
## What is the purpose of the change
As the name implies, this PR fixes a bug that could lead to `NPEs` when
trying to access the newly introduced broadcast state with not initialized
state descriptors. This could manifest itself in the case
where:
1) scala is used and the descriptors are `lazy`
2) the descriptors are initialized in the `open()` method of the `process
function`.
## Brief change log
The `context`s passed to the methods of the broadcast process functions now
call `.initializeSerializerUnlessSet(...)` on the provided state descriptors.
## Verifying this change
Already existing tests have been modified to trigger the new code path.
## 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/kl0u/flink broadcast-inv
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5477.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 #5477
----
commit 1d08d5221ced365e643925d945ec042b44a6824f
Author: kkloudas <kkloudas@...>
Date: 2018-02-13T10:46:02Z
[FLINK-8642] Initialize descriptors before use at getBroadcastState().
----
> Initialize descriptors before use at getBroadcastState().
> ---------------------------------------------------------
>
> Key: FLINK-8642
> URL: https://issues.apache.org/jira/browse/FLINK-8642
> Project: Flink
> Issue Type: Bug
> Components: DataStream API
> Affects Versions: 1.5.0
> Reporter: Kostas Kloudas
> Assignee: Kostas Kloudas
> Priority: Major
> Fix For: 1.5.0
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)