beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kenneth Knowles (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (BEAM-703) SingletonViewFn might exhaust defaultValue if it's serialized after being used.
Date Tue, 04 Oct 2016 19:31:20 GMT

     [ https://issues.apache.org/jira/browse/BEAM-703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kenneth Knowles resolved BEAM-703.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 0.3.0-incubating

> SingletonViewFn might exhaust defaultValue if it's serialized after being used. 
> --------------------------------------------------------------------------------
>
>                 Key: BEAM-703
>                 URL: https://issues.apache.org/jira/browse/BEAM-703
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Amit Sela
>            Assignee: Amit Sela
>            Priority: Minor
>             Fix For: 0.3.0-incubating
>
>
> In https://github.com/apache/incubator-beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/util/PCollectionViews.java#L267
the defaultValue is set to null to avoid decoding over and over I assume.
> If the defaultValue is accessed before the the SingletonViewFn is serialized, it will
exhaust the encoded value (assigned with null) while losing the transient decoded value.
> It'd probably be best to simply check if defaultValue is null before decoding, so that
decode will still happen just once, but the encoded data is not lost. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message