[
https://issues.apache.org/jira/browse/KUDU-1850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884971#comment-15884971
]
Todd Lipcon commented on KUDU-1850:
-----------------------------------
Ran the following to find all of our protobuf enums:
{code}
git grep -h '^enum' *proto | awk '{print $2}' | perl -e 'print join("\\|", map
{chomp; $_} <>), "\n";'
{code}
and then used the result to look for repeated enum fields:
{code}
git grep 'repeated
\(DataType\|EncodingType\|ExternalConsistencyMode\|ReadMode\|OrderMode\|OperationType\|DriverType\|ChangeConfigType\|OpIdType\|LogEntryTypePB\|ConsensusConfigType\|BlockRecordType\|MasterFeatures\|RpcFeatureFlag\|FeatureFlags\|TabletDataState\|TabletStatePB\|TabletServerFeatures\|TSTabletManagerStatePB\|CompressionType\)'
*proto
{code}
and only found:
{code}
src/kudu/rpc/rpc_header.proto: repeated RpcFeatureFlag supported_features = 1;
{code}
For this particular field, we are fine to just skip any supported features that
the local build doesn't know about, since the supported features are "optional"
info provided to the other side, and ignoring an unknown one is always correct.
> Check treatment of unknown values in protobuf repeated fields
> -------------------------------------------------------------
>
> Key: KUDU-1850
> URL: https://issues.apache.org/jira/browse/KUDU-1850
> Project: Kudu
> Issue Type: Bug
> Components: rpc
> Affects Versions: 1.2.0
> Reporter: Todd Lipcon
> Priority: Critical
>
> We've been operating under the assumption that unknown values in 'repeated
> MyEnum foo' in protobuf would show up as the first variant of the enum. In
> fact this doesn't seem to be the case (at least in C++). Rather, the values
> end up in the UnknownFieldSet.
> This might have impact in a few places, most notably the feature flags stuff
> in the RPC system.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)