You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Colin McCabe (Jira)" <ji...@apache.org> on 2024/10/21 18:40:00 UTC
[jira] [Resolved] (KAFKA-17845) UpdateRaftVoterResponse has incorrect default value fallbacks
[ https://issues.apache.org/jira/browse/KAFKA-17845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Colin McCabe resolved KAFKA-17845.
----------------------------------
Resolution: Invalid
> UpdateRaftVoterResponse has incorrect default value fallbacks
> -------------------------------------------------------------
>
> Key: KAFKA-17845
> URL: https://issues.apache.org/jira/browse/KAFKA-17845
> Project: Kafka
> Issue Type: Bug
> Affects Versions: 3.9.0
> Reporter: Anton Agestam
> Priority: Major
>
> This was discovered through property testing for upgrading kio to Kafka 3.9.0-rc2 schema.
> We have tests in place to assert that our protocol serializer implementation is sync with upstream Kafka.
> The test discovered a discrepancy between kio and Kafka for this instance:
>
> {code:java}
> E instance=UpdateRaftVoterResponse(
> E throttle_time=datetime.timedelta(0),
> E error_code=<ErrorCode.unknown_server_error: -1>,
> E current_leader=CurrentLeader(
> E leader_id=-1,
> E leader_epoch=-1,
> E host='',
> E port=0,
> E ),
> E ), {code}
> kio serializes this as `"AAAAAP//AQAO//////////8BAAAAAAA="` while Kafka serializes it as `"AAAAAP//AA=="` (base 64 encoded bytes).
> This is as if the `host` and `port` fields have defaults of empty string and zero, but they do not.
> This looks to me like the behavior for [deserializing a message from a previous version |https://github.com/apache/kafka/tree/trunk/clients/src/main/resources/common/message#deserializing-messages] is incorrectly kicking in here.
> I would expect to either see the defaults declared in the schema, or for this model to not exercise this "omit the nested entity" behavior at all, since all of the fields of the nested entity do not have default values.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)