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/09/15 19:47:00 UTC
[jira] [Comment Edited] (BEAM-2959) Fix proto enums to not use 0
for a valid value
[ https://issues.apache.org/jira/browse/BEAM-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16168415#comment-16168415 ]
Luke Cwik edited comment on BEAM-2959 at 9/15/17 7:46 PM:
----------------------------------------------------------
Note that making this change I discovered a bug in how windowing strategy translation was being performed which will cause an error.
Fortunately this does not seem to be used within the Apache Beam 2.1.0 release but will be released in Apache Beam 2.2.0 which is why this change needs to be accepted so we don't have a data loss/corruption issue.
was (Author: lcwik):
Note that making this change I discovered a bug in how windowing strategy translation was being performed which will cause an error.
> Fix proto enums to not use 0 for a valid value
> ----------------------------------------------
>
> Key: BEAM-2959
> URL: https://issues.apache.org/jira/browse/BEAM-2959
> Project: Beam
> Issue Type: Bug
> Components: beam-model
> Reporter: Luke Cwik
> Assignee: Luke Cwik
> Priority: Minor
> Fix For: 2.2.0
>
>
> Proto3 uses 0 as the default value for enums and does not encode it on the wire which means that you can not detect the difference between a value that is unset and an enum that is set but has a value of zero.
> Defining an "YYY_UNSPECIFIED" is considered a best practice. Unfortunately this is not done automatically because of proto2 compatibility within proto3.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)