You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Luke Cwik (JIRA)" <ji...@apache.org> on 2017/11/16 22:35:00 UTC
[jira] [Resolved] (BEAM-3202) Multiple deserializations of
PipelineOptions leaks memory
[ https://issues.apache.org/jira/browse/BEAM-3202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luke Cwik resolved BEAM-3202.
-----------------------------
Resolution: Fixed
> Multiple deserializations of PipelineOptions leaks memory
> ---------------------------------------------------------
>
> Key: BEAM-3202
> URL: https://issues.apache.org/jira/browse/BEAM-3202
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-core
> Reporter: Luke Cwik
> Assignee: Luke Cwik
> Fix For: 2.3.0
>
>
> In particular, upon deserializing a PipelineOptions object,
> ProxyInvocationHandler.Deserializer
> calls ValueProvider.RuntimeValueProvider.setRuntimeOptions(options) which
> stores the (newly) deserialized PipelineOptions instance in a static map
> inside the RuntimeValueProvider class, where the key is an id obtained by
> calling deserializedOptions.getOptionsId().
> The thing is, performing a serialize-deserialize cycle on a given
> PipelineOptions instance and invoking getOptionsId() yields different
> optionsIds. Therefore, multiple deserializations of the same
> PipelineOptions instance result in new keys being added to the static
> "optionsMap" map inside the ValueProvider.RuntimeValueProvider class.
> The fix is to populate the options id when PipelineOptions is created. This can be tested by creating a PipelineOptions object and then serializing/deserializing it and ensuring that it has the same options id as the original.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)