You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "cmccabe (via GitHub)" <gi...@apache.org> on 2023/11/29 00:35:40 UTC

[PR] KAFKA-15922: Add a MetadataVersion for JBOD [kafka]

cmccabe opened a new pull request, #14860:
URL: https://github.com/apache/kafka/pull/14860

   Assign MetadataVersion.IBP_3_7_IV2 to JBOD.
   
   Move KIP-966 support to MetadataVersion.IBP_3_7_IV3.
   
   Create MetadataVersion.LATEST_PRODUCTION as the latest metadata version that can be used when formatting a new cluster, or upgrading a cluster using kafka-features.sh. This will allow us to clearly distinguish between stable and unstable metadata versions for the first time.


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-15922: Add a MetadataVersion for JBOD [kafka]

Posted by "cmccabe (via GitHub)" <gi...@apache.org>.
cmccabe commented on code in PR #14860:
URL: https://github.com/apache/kafka/pull/14860#discussion_r1409941745


##########
server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java:
##########
@@ -207,6 +213,22 @@ public enum MetadataVersion {
      */
     public static final MetadataVersion MINIMUM_BOOTSTRAP_VERSION = IBP_3_3_IV0;
 
+    /**
+     * The latest production-ready MetadataVersion. This is the latest version that is stable
+     * and cannot be changed. MetadataVersions later than this can be tested via junit, but
+     * not deployed in production.
+     *
+     * <strong>Think carefully before you update this value. ONCE A METADATA VERSION IS PRODUCTION,
+     * IT CANNOT BE CHANGED.</strong>
+     */
+    public static final MetadataVersion LATEST_PRODUCTION = IBP_3_7_IV0;

Review Comment:
   yes. once it's production we'll change this (could be with a MINOR or with a JIRA). And then we can't change it



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-15922: Add a MetadataVersion for JBOD [kafka]

Posted by "junrao (via GitHub)" <gi...@apache.org>.
junrao commented on code in PR #14860:
URL: https://github.com/apache/kafka/pull/14860#discussion_r1413208491


##########
clients/src/main/java/org/apache/kafka/common/requests/BrokerRegistrationRequest.java:
##########
@@ -45,10 +45,6 @@ public short oldestAllowedVersion() {
 
         @Override
         public BrokerRegistrationRequest build(short version) {
-            if (version < 2) {
-                // Reset the PreviousBrokerEpoch to default if not supported.
-                data.setPreviousBrokerEpoch(new BrokerRegistrationRequestData().previousBrokerEpoch());
-            }

Review Comment:
   It seems that this is being tracked in https://github.com/apache/kafka/pull/14887.



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-15922: Add a MetadataVersion for JBOD [kafka]

Posted by "soarez (via GitHub)" <gi...@apache.org>.
soarez commented on code in PR #14860:
URL: https://github.com/apache/kafka/pull/14860#discussion_r1409826262


##########
server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java:
##########
@@ -207,6 +213,22 @@ public enum MetadataVersion {
      */
     public static final MetadataVersion MINIMUM_BOOTSTRAP_VERSION = IBP_3_3_IV0;
 
+    /**
+     * The latest production-ready MetadataVersion. This is the latest version that is stable
+     * and cannot be changed. MetadataVersions later than this can be tested via junit, but
+     * not deployed in production.
+     *
+     * <strong>Think carefully before you update this value. ONCE A METADATA VERSION IS PRODUCTION,
+     * IT CANNOT BE CHANGED.</strong>
+     */
+    public static final MetadataVersion LATEST_PRODUCTION = IBP_3_7_IV0;

Review Comment:
   So I guess we need another JIRA to change this to `IBP_3_7_IV2` before the 3.7 release?



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-15922: Add a MetadataVersion for JBOD [kafka]

Posted by "cmccabe (via GitHub)" <gi...@apache.org>.
cmccabe merged PR #14860:
URL: https://github.com/apache/kafka/pull/14860


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-15922: Add a MetadataVersion for JBOD [kafka]

Posted by "cmccabe (via GitHub)" <gi...@apache.org>.
cmccabe commented on code in PR #14860:
URL: https://github.com/apache/kafka/pull/14860#discussion_r1409938934


##########
core/src/test/scala/unit/kafka/cluster/PartitionTest.scala:
##########
@@ -2191,7 +2191,7 @@ class PartitionTest extends AbstractPartitionTest {
     val partition = new Partition(
       topicPartition,
       replicaLagTimeMaxMs = Defaults.ReplicaLagTimeMaxMs,
-      interBrokerProtocolVersion = MetadataVersion.IBP_3_7_IV1,
+      interBrokerProtocolVersion = MetadataVersion.IBP_3_7_IV2,

Review Comment:
   Wanted a JBOD version here



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-15922: Add a MetadataVersion for JBOD [kafka]

Posted by "cmccabe (via GitHub)" <gi...@apache.org>.
cmccabe commented on code in PR #14860:
URL: https://github.com/apache/kafka/pull/14860#discussion_r1409941250


##########
metadata/src/main/resources/common/metadata/PartitionRecord.json:
##########
@@ -42,13 +42,13 @@
       "about": "The epoch of the partition leader." },
     { "name": "PartitionEpoch", "type": "int32", "versions": "0+", "default": "-1",
       "about": "An epoch that gets incremented each time we change anything in the partition." },
+    { "name": "Directories", "type": "[]uuid", "versions": "1+",
+      "about": "The log directory hosting each replica, sorted in the same exact order as the Replicas field."},
     { "name": "EligibleLeaderReplicas", "type": "[]int32", "default": "null", "entityType": "brokerId",
-      "versions": "1+", "nullableVersions": "1+", "taggedVersions": "1+", "tag": 1,
+      "versions": "2+", "nullableVersions": "1+", "taggedVersions": "2+", "tag": 1,

Review Comment:
   fixed



##########
metadata/src/main/resources/common/metadata/PartitionRecord.json:
##########
@@ -42,13 +42,13 @@
       "about": "The epoch of the partition leader." },
     { "name": "PartitionEpoch", "type": "int32", "versions": "0+", "default": "-1",
       "about": "An epoch that gets incremented each time we change anything in the partition." },
+    { "name": "Directories", "type": "[]uuid", "versions": "1+",
+      "about": "The log directory hosting each replica, sorted in the same exact order as the Replicas field."},
     { "name": "EligibleLeaderReplicas", "type": "[]int32", "default": "null", "entityType": "brokerId",
-      "versions": "1+", "nullableVersions": "1+", "taggedVersions": "1+", "tag": 1,
+      "versions": "2+", "nullableVersions": "1+", "taggedVersions": "2+", "tag": 1,
       "about": "The eligible leader replicas of this partition." },
     { "name": "LastKnownELR", "type": "[]int32", "default": "null", "entityType": "brokerId",
-      "versions": "1+", "nullableVersions": "1+", "taggedVersions": "1+", "tag": 2,
-      "about": "The last known eligible leader replicas of this partition." },
-    { "name": "Directories", "type": "[]uuid", "versions": "2+",
-      "about": "The log directory hosting each replica, sorted in the same exact order as the Replicas field."}
+      "versions": "2+", "nullableVersions": "1+", "taggedVersions": "2+", "tag": 2,

Review Comment:
   fixed



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-15922: Add a MetadataVersion for JBOD [kafka]

Posted by "cmccabe (via GitHub)" <gi...@apache.org>.
cmccabe commented on code in PR #14860:
URL: https://github.com/apache/kafka/pull/14860#discussion_r1409942437


##########
server-common/src/test/java/org/apache/kafka/server/common/MetadataVersionTest.java:
##########
@@ -329,19 +336,44 @@ public void testIsDelegationTokenSupported(MetadataVersion metadataVersion) {
     @ParameterizedTest
     @EnumSource(value = MetadataVersion.class)
     public void testIsElrSupported(MetadataVersion metadataVersion) {
-        assertEquals(metadataVersion.equals(IBP_3_7_IV1),
-                metadataVersion.isElrSupported());
-        short expectPartitionRecordVersion = metadataVersion.equals(IBP_3_7_IV1) ? (short) 1 : (short) 0;
-        assertEquals(expectPartitionRecordVersion, metadataVersion.partitionRecordVersion());
-        short expectPartitionChangeRecordVersion = metadataVersion.equals(IBP_3_7_IV1) ? (short) 1 : (short) 0;
-        assertEquals(expectPartitionChangeRecordVersion, metadataVersion.partitionChangeRecordVersion());
+        assertEquals(metadataVersion.equals(IBP_3_7_IV3), metadataVersion.isElrSupported());

Review Comment:
   yes to both



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-15922: Add a MetadataVersion for JBOD [kafka]

Posted by "rondagostino (via GitHub)" <gi...@apache.org>.
rondagostino commented on code in PR #14860:
URL: https://github.com/apache/kafka/pull/14860#discussion_r1409696104


##########
core/src/main/scala/kafka/tools/StorageTool.scala:
##########
@@ -59,10 +59,14 @@ object StorageTool extends Logging {
         case "format" =>
           val directories = configToLogDirectories(config.get)
           val clusterId = namespace.getString("cluster_id")
-          val metadataVersion = getMetadataVersion(namespace, Option(config.get.interBrokerProtocolVersionString))
+          val metadataVersion = getMetadataVersion(namespace,
+            Option(config.get.originals.get(KafkaConfig.InterBrokerProtocolVersionProp)).map(_.toString))
           if (!metadataVersion.isKRaftSupported) {
             throw new TerseFailure(s"Must specify a valid KRaft metadata version of at least 3.0.")
           }
+          if (!metadataVersion.isProduction()) {
+            throw new TerseFailure(s"Metadata version ${metadataVersion} is not ready for production use yet.")
+          }

Review Comment:
   Do we need an override flag/option, do you think?



##########
server-common/src/test/java/org/apache/kafka/server/common/MetadataVersionTest.java:
##########
@@ -386,4 +418,21 @@ public void testOffsetCommitValueVersion(MetadataVersion metadataVersion) {
     public void testOffsetCommitValueVersionWithExpiredTimestamp(MetadataVersion metadataVersion) {
         assertEquals((short) 1, metadataVersion.offsetCommitValueVersion(true));
     }
+
+    @Test
+    public void assertLatestProductionIsLessThanLatest() {
+        assertTrue(LATEST_PRODUCTION.ordinal() < MetadataVersion.latest().ordinal(),
+            "Expected LATEST_PRODUCTION " + LATEST_PRODUCTION +
+            " to be less than the latest of " + MetadataVersion.latest());
+    }

Review Comment:
   Will this always be true?  It seems that if we want to make the latest one production-ready then we will have to add a new MetadataVersion after it that isn't.  Is this what we want?



##########
metadata/src/main/resources/common/metadata/PartitionRecord.json:
##########
@@ -42,13 +42,13 @@
       "about": "The epoch of the partition leader." },
     { "name": "PartitionEpoch", "type": "int32", "versions": "0+", "default": "-1",
       "about": "An epoch that gets incremented each time we change anything in the partition." },
+    { "name": "Directories", "type": "[]uuid", "versions": "1+",
+      "about": "The log directory hosting each replica, sorted in the same exact order as the Replicas field."},
     { "name": "EligibleLeaderReplicas", "type": "[]int32", "default": "null", "entityType": "brokerId",
-      "versions": "1+", "nullableVersions": "1+", "taggedVersions": "1+", "tag": 1,
+      "versions": "2+", "nullableVersions": "1+", "taggedVersions": "2+", "tag": 1,

Review Comment:
   `s/nullableVersions": "1+",/nullableVersions": "2+",/` (unless this is done this way on purpose, in which case could you explain why to help me understand?)



##########
server-common/src/test/java/org/apache/kafka/server/common/MetadataVersionTest.java:
##########
@@ -329,19 +336,44 @@ public void testIsDelegationTokenSupported(MetadataVersion metadataVersion) {
     @ParameterizedTest
     @EnumSource(value = MetadataVersion.class)
     public void testIsElrSupported(MetadataVersion metadataVersion) {
-        assertEquals(metadataVersion.equals(IBP_3_7_IV1),
-                metadataVersion.isElrSupported());
-        short expectPartitionRecordVersion = metadataVersion.equals(IBP_3_7_IV1) ? (short) 1 : (short) 0;
-        assertEquals(expectPartitionRecordVersion, metadataVersion.partitionRecordVersion());
-        short expectPartitionChangeRecordVersion = metadataVersion.equals(IBP_3_7_IV1) ? (short) 1 : (short) 0;
-        assertEquals(expectPartitionChangeRecordVersion, metadataVersion.partitionChangeRecordVersion());
+        assertEquals(metadataVersion.equals(IBP_3_7_IV3), metadataVersion.isElrSupported());

Review Comment:
   `s/metadataVersion.equals/metadataVersion.isAtLeast`
   
   We should probably add a method `testIsDirectoryAssignmentSupported(MetadataVersion metadataVersion)`



##########
metadata/src/main/resources/common/metadata/PartitionRecord.json:
##########
@@ -42,13 +42,13 @@
       "about": "The epoch of the partition leader." },
     { "name": "PartitionEpoch", "type": "int32", "versions": "0+", "default": "-1",
       "about": "An epoch that gets incremented each time we change anything in the partition." },
+    { "name": "Directories", "type": "[]uuid", "versions": "1+",
+      "about": "The log directory hosting each replica, sorted in the same exact order as the Replicas field."},
     { "name": "EligibleLeaderReplicas", "type": "[]int32", "default": "null", "entityType": "brokerId",
-      "versions": "1+", "nullableVersions": "1+", "taggedVersions": "1+", "tag": 1,
+      "versions": "2+", "nullableVersions": "1+", "taggedVersions": "2+", "tag": 1,
       "about": "The eligible leader replicas of this partition." },
     { "name": "LastKnownELR", "type": "[]int32", "default": "null", "entityType": "brokerId",
-      "versions": "1+", "nullableVersions": "1+", "taggedVersions": "1+", "tag": 2,
-      "about": "The last known eligible leader replicas of this partition." },
-    { "name": "Directories", "type": "[]uuid", "versions": "2+",
-      "about": "The log directory hosting each replica, sorted in the same exact order as the Replicas field."}
+      "versions": "2+", "nullableVersions": "1+", "taggedVersions": "2+", "tag": 2,

Review Comment:
   `s/nullableVersions": "1+",/nullableVersions": "2+",/` (same caveat as above)



##########
metadata/src/main/java/org/apache/kafka/controller/QuorumFeatures.java:
##########
@@ -58,7 +58,7 @@ public static Map<String, VersionRange> defaultFeatureMap() {
         Map<String, VersionRange> features = new HashMap<>(1);
         features.put(MetadataVersion.FEATURE_NAME, VersionRange.of(
                 MetadataVersion.MINIMUM_KRAFT_VERSION.featureLevel(),
-                MetadataVersion.latest().featureLevel()));
+                MetadataVersion.LATEST_PRODUCTION.featureLevel()));

Review Comment:
   Should add a test to lock this is.



##########
core/src/test/scala/unit/kafka/tools/StorageToolTest.scala:
##########
@@ -203,7 +203,7 @@ Found problem:
   def testDefaultMetadataVersion(): Unit = {
     val namespace = StorageTool.parseArguments(Array("format", "-c", "config.props", "-t", "XcZZOzUqS4yHOjhMQB6JLQ"))
     val mv = StorageTool.getMetadataVersion(namespace, defaultVersionString = None)
-    assertEquals(MetadataVersion.latest().featureLevel(), mv.featureLevel(),
+    assertEquals(MetadataVersion.LATEST_PRODUCTION.featureLevel(), mv.featureLevel(),
       "Expected the default metadata.version to be the latest version")

Review Comment:
   `s/to be the latest version/to be the latest production-ready version/`



##########
core/src/test/scala/unit/kafka/cluster/PartitionTest.scala:
##########
@@ -2191,7 +2191,7 @@ class PartitionTest extends AbstractPartitionTest {
     val partition = new Partition(
       topicPartition,
       replicaLagTimeMaxMs = Defaults.ReplicaLagTimeMaxMs,
-      interBrokerProtocolVersion = MetadataVersion.IBP_3_7_IV1,
+      interBrokerProtocolVersion = MetadataVersion.IBP_3_7_IV2,

Review Comment:
   Curious why this changed?



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-15922: Add a MetadataVersion for JBOD [kafka]

Posted by "cmccabe (via GitHub)" <gi...@apache.org>.
cmccabe commented on code in PR #14860:
URL: https://github.com/apache/kafka/pull/14860#discussion_r1409942673


##########
server-common/src/test/java/org/apache/kafka/server/common/MetadataVersionTest.java:
##########
@@ -386,4 +418,21 @@ public void testOffsetCommitValueVersion(MetadataVersion metadataVersion) {
     public void testOffsetCommitValueVersionWithExpiredTimestamp(MetadataVersion metadataVersion) {
         assertEquals((short) 1, metadataVersion.offsetCommitValueVersion(true));
     }
+
+    @Test
+    public void assertLatestProductionIsLessThanLatest() {
+        assertTrue(LATEST_PRODUCTION.ordinal() < MetadataVersion.latest().ordinal(),
+            "Expected LATEST_PRODUCTION " + LATEST_PRODUCTION +
+            " to be less than the latest of " + MetadataVersion.latest());
+    }

Review Comment:
   yes. there should always be a new unstable version for the new stuff to go in :)



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-15922: Add a MetadataVersion for JBOD [kafka]

Posted by "cmccabe (via GitHub)" <gi...@apache.org>.
cmccabe commented on code in PR #14860:
URL: https://github.com/apache/kafka/pull/14860#discussion_r1409900140


##########
core/src/main/scala/kafka/tools/StorageTool.scala:
##########
@@ -59,10 +59,14 @@ object StorageTool extends Logging {
         case "format" =>
           val directories = configToLogDirectories(config.get)
           val clusterId = namespace.getString("cluster_id")
-          val metadataVersion = getMetadataVersion(namespace, Option(config.get.interBrokerProtocolVersionString))
+          val metadataVersion = getMetadataVersion(namespace,
+            Option(config.get.originals.get(KafkaConfig.InterBrokerProtocolVersionProp)).map(_.toString))
           if (!metadataVersion.isKRaftSupported) {
             throw new TerseFailure(s"Must specify a valid KRaft metadata version of at least 3.0.")
           }
+          if (!metadataVersion.isProduction()) {
+            throw new TerseFailure(s"Metadata version ${metadataVersion} is not ready for production use yet.")
+          }

Review Comment:
   I created an internal configuration `unstable.metadata.versions.enable` to bypass this. Since it is internal and undocumented, it doesn't need a KIP.
   
   (Also see the very similar `unstable.api.versions.enable`)



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-15922: Add a MetadataVersion for JBOD [kafka]

Posted by "cmccabe (via GitHub)" <gi...@apache.org>.
cmccabe commented on PR #14860:
URL: https://github.com/apache/kafka/pull/14860#issuecomment-1832698639

   > Left a few comments, nothing major directly on the changes.
   > 
   > I do have a high-level thought to put out there. This currently prevents the storage tool from formatting with a non production MetadataVersion and prevents the feature tool from updating a running cluster to a non-production MetadataVersion. I wonder if this will break anything, and I wonder if perhaps we should add a break-glass mechanism to circumvent these things in case something does break. While this may not require a KIP per-se, I would not be surprised if changing this causes issues for people somewhere.
   
   I don't think this will break any existing use-cases.
   
   I agree that having a break-glass mechanism would be useful for some testing cases. Although we need to be very sure to document that it shouldn't be used in production. Maybe we can follow up with a KIP later. But it would be too late for 3.7.


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-15922: Add a MetadataVersion for JBOD [kafka]

Posted by "cmccabe (via GitHub)" <gi...@apache.org>.
cmccabe commented on PR #14860:
URL: https://github.com/apache/kafka/pull/14860#issuecomment-1834306862

   > Can we also fix the builder version handling here?
   > With this fixed, LGTM
   
   Good catch. The best way to fix this would be to add "ignorable" to the JSON definition, so that it will get automatically dropped if the version is too old. Will do.


-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-15922: Add a MetadataVersion for JBOD [kafka]

Posted by "apoorvmittal10 (via GitHub)" <gi...@apache.org>.
apoorvmittal10 commented on code in PR #14860:
URL: https://github.com/apache/kafka/pull/14860#discussion_r1413198971


##########
clients/src/main/java/org/apache/kafka/common/requests/BrokerRegistrationRequest.java:
##########
@@ -45,10 +45,6 @@ public short oldestAllowedVersion() {
 
         @Override
         public BrokerRegistrationRequest build(short version) {
-            if (version < 2) {
-                // Reset the PreviousBrokerEpoch to default if not supported.
-                data.setPreviousBrokerEpoch(new BrokerRegistrationRequestData().previousBrokerEpoch());
-            }

Review Comment:
   @cmccabe I am not an expert with the change in the PR but this change might have broken the tests for `BrokerRegistrationRequestTest`, tests fails for `version < 2`
   
   Also I might be missing something to read the builds for this PR but as far as I can check I don't see any successful build for the PR as well, please let me know if I am reading something wrong.
   
   https://ci-builds.apache.org/blue/organizations/jenkins/Kafka%2Fkafka-pr/activity?branch=PR-14860
   
   cc: @junrao @pprovenzano @dajac @AndrewJSchofield (for failing tests in the other PR builds for `BrokerRegistrationRequestTest`)



-- 
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-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-15922: Add a MetadataVersion for JBOD [kafka]

Posted by "apoorvmittal10 (via GitHub)" <gi...@apache.org>.
apoorvmittal10 commented on code in PR #14860:
URL: https://github.com/apache/kafka/pull/14860#discussion_r1413198971


##########
clients/src/main/java/org/apache/kafka/common/requests/BrokerRegistrationRequest.java:
##########
@@ -45,10 +45,6 @@ public short oldestAllowedVersion() {
 
         @Override
         public BrokerRegistrationRequest build(short version) {
-            if (version < 2) {
-                // Reset the PreviousBrokerEpoch to default if not supported.
-                data.setPreviousBrokerEpoch(new BrokerRegistrationRequestData().previousBrokerEpoch());
-            }

Review Comment:
   @cmccabe I am not an expert with the change in the PR but this change might have broken the tests for `BrokerRegistrationRequestTest`, tests fails for `version < 2`
   
   Also I might be missing something to read the builds for this PR but as far as I can check I don't see any successful build for the PR as well, please let me know if I am reading something wrong.
   
   https://ci-builds.apache.org/blue/organizations/jenkins/Kafka%2Fkafka-pr/activity?branch=PR-14860
   
   cc: @junrao @pprovenzano @dajac @AndrewJSchofield (for failing tests in the PR and merge)



-- 
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-unsubscribe@kafka.apache.org

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