You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Ivan Andika (Jira)" <ji...@apache.org> on 2025/02/06 01:23:00 UTC
[jira] [Updated] (HDDS-12213) Review and fix the default proto enum value
[ https://issues.apache.org/jira/browse/HDDS-12213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan Andika updated HDDS-12213:
-------------------------------
Description:
https://protobuf.dev/programming-guides/proto2/#enum-default
https://protobuf.dev/programming-guides/proto3/#enum-default
The default enum value protobuf is the first enum, regardless whether the field is optional. In proto3 the "unspecified" field with id 0 *must* be specified.
For example in for ReplicationType and ReplicationFactor, the first enums are RATIS and ONE respectively, which might cause RATIS/ONE to be created by default.
We need to review these proto enums and see whether we can improve these.
was:
https://protobuf.dev/programming-guides/proto2/#enum-default
https://protobuf.dev/programming-guides/proto3/#enum-default
The default enum value protobuf is the first, regardless whether the field is optional. In proto3 the "unspecified" field with id 0 *must* be specified.
For example in for ReplicationType and ReplicationFactor, the first enums are RATIS and ONE respectively, which might cause RATIS/ONE to be created by default.
We need to review these proto enums and see whether we can improve these.
> Review and fix the default proto enum value
> -------------------------------------------
>
> Key: HDDS-12213
> URL: https://issues.apache.org/jira/browse/HDDS-12213
> Project: Apache Ozone
> Issue Type: Improvement
> Reporter: Ivan Andika
> Priority: Major
>
> https://protobuf.dev/programming-guides/proto2/#enum-default
> https://protobuf.dev/programming-guides/proto3/#enum-default
> The default enum value protobuf is the first enum, regardless whether the field is optional. In proto3 the "unspecified" field with id 0 *must* be specified.
> For example in for ReplicationType and ReplicationFactor, the first enums are RATIS and ONE respectively, which might cause RATIS/ONE to be created by default.
> We need to review these proto enums and see whether we can improve these.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org