[
https://issues.apache.org/jira/browse/KAFKA-17033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
José Armando García Sancio updated KAFKA-17033:
-----------------------------------------------
Description:
The current type for directoryId field in ReplicaKey is Optional<Uuid>. The
field is Optional.empty when the directory id is Uuuid.ZERO_UUID. This nice
because if forces KRaft to handle the empty care differently.
The issue with this modeling is that anytime KRaft needs to serialize the
directory it does an explicit conversion to the zero uuid when the option is
empty.
It is possible that adding a type like DirectoryId could improve the user
experience when dealing with the directory uuid.
was:One way to handle this is to introduce a type called `DirectoryId` that
just encapsulates a Uuid but it is able to better handle the Uuid.ZERO_UUID
case.
> Consider replacing the type of the ReplicaKey directory id field.
> -----------------------------------------------------------------
>
> Key: KAFKA-17033
> URL: https://issues.apache.org/jira/browse/KAFKA-17033
> Project: Kafka
> Issue Type: Sub-task
> Reporter: José Armando García Sancio
> Priority: Major
>
> The current type for directoryId field in ReplicaKey is Optional<Uuid>. The
> field is Optional.empty when the directory id is Uuuid.ZERO_UUID. This nice
> because if forces KRaft to handle the empty care differently.
> The issue with this modeling is that anytime KRaft needs to serialize the
> directory it does an explicit conversion to the zero uuid when the option is
> empty.
> It is possible that adding a type like DirectoryId could improve the user
> experience when dealing with the directory uuid.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)