You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Mickael Maison (Jira)" <ji...@apache.org> on 2026/04/09 13:17:00 UTC

[jira] [Commented] (KAFKA-18402) Optimise of comparison on org.apache.kafka.common.Uuid

    [ https://issues.apache.org/jira/browse/KAFKA-18402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18072269#comment-18072269 ] 

Mickael Maison commented on KAFKA-18402:
----------------------------------------

Moving to the next release as we're now in code freeze for 4.3.0.

> Optimise of comparison on org.apache.kafka.common.Uuid 
> -------------------------------------------------------
>
>                 Key: KAFKA-18402
>                 URL: https://issues.apache.org/jira/browse/KAFKA-18402
>             Project: Kafka
>          Issue Type: Improvement
>          Components: clients
>            Reporter: Said BOUDJELDA
>            Assignee: Said BOUDJELDA
>            Priority: Minor
>              Labels: common
>             Fix For: 4.3.0
>
>
> The the reference implementation for org.apache.kafka.common.Uuid compareTo public method as  of java.util.UUID  
> {code:java}
>     @Override
>     public int compareTo(UUID val) {
>         // The ordering is intentionally set up so that the UUIDs
>         // can simply be numerically compared as two numbers
>         int mostSigBits = Long.compare(this.mostSigBits, val.mostSigBits);
>         return mostSigBits != 0 ? mostSigBits : Long.compare(this.leastSigBits, val.leastSigBits);
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)