mingyen066 opened a new pull request, #21441:
URL: https://github.com/apache/kafka/pull/21441
`mapKey` only affects the in-memory data structure, not serialization:
- In `MessageDataGenerator#generateVariableLengthReader`,
`isStructArrayWithKeys`
only controls which collection class is instantiated
(`ImplicitLinkedHashMultiCollection` vs `ArrayList`), not how bytes are
read from the network.
- In `MessageDataGenerator#generateClassWriter`, the serialization logic
has no branch for `mapKey` or `hasKeys` — all fields are written the
same way regardless of `mapKey`.
Therefore, adding or removing `mapKey` on an existing field is a compatible
change, as demonstrated in #19815 where `mapKey` was added to
already-released RPCs without bumping `validVersions`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]