cmccabe commented on code in PR #16235:
URL: https://github.com/apache/kafka/pull/16235#discussion_r1653309009


##########
raft/src/main/java/org/apache/kafka/raft/internals/ReplicaKey.java:
##########
@@ -21,7 +21,9 @@
 import java.util.Objects;
 import java.util.Optional;
 
-public final class ReplicaKey {
+public final class ReplicaKey implements Comparable<ReplicaKey> {
+    public static final Uuid NO_DIRECTORY_ID = Uuid.ZERO_UUID;
+
     private final int id;
     private final Optional<Uuid> directoryId;

Review Comment:
   I don't think having a special class would be better (in fact, I think it 
would be strictly worse than just using `Optional`)
   
   If you feel strongly about this, then I guess just leave it as Optional. I 
find this messy (for one thing, you have to make sure to remember to transform 
UUID_ZERO into Optional.empty in all the relevant places) but maybe I'm not 
going to convince you here :)



##########
server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java:
##########
@@ -408,7 +408,9 @@ public short partitionRecordVersion() {
     }
 
     public short fetchRequestVersion() {
-        if (this.isAtLeast(IBP_3_7_IV4)) {
+        if (this.isAtLeast(IBP_4_0_IV0)) {

Review Comment:
   we will fix this in https://github.com/apache/kafka/pull/16347/commits



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to