-
Notifications
You must be signed in to change notification settings - Fork 15.4k
KAFKA-16968: Make 3.8-IV0 a stable MetadataVersion and create 3.9-IV0 #16347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
fbb566f
ea90660
43daca5
12370b4
f96af84
4e9c025
68d1265
84ea68c
77e8b86
95e1a49
933aed5
a2c7f0a
c06985d
c183b4d
1545da7
fccf7cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -202,11 +202,23 @@ public enum MetadataVersion { | |
| // Add new fetch request version for KIP-951 | ||
| IBP_3_7_IV4(19, "3.7", "IV4", false), | ||
|
|
||
| // New version for the Kafka 3.8.0 release. | ||
| IBP_3_8_IV0(20, "3.8", "IV0", false), | ||
|
|
||
| // | ||
| // NOTE: MetadataVersions after this point are unstable and may be changed. | ||
| // If users attempt to use an unstable MetadataVersion, they will get an error. | ||
| // Please move this comment when updating the LATEST_PRODUCTION constant. | ||
| // | ||
|
|
||
| // Support ListOffsetRequest v9 for KIP-1005. | ||
| IBP_3_9_IV0(21, "3.9", "IV0", true), | ||
|
cmccabe marked this conversation as resolved.
Outdated
cmccabe marked this conversation as resolved.
Outdated
|
||
|
|
||
| // Add ELR related supports (KIP-966). | ||
|
cmccabe marked this conversation as resolved.
|
||
| IBP_3_8_IV0(20, "3.8", "IV0", true), | ||
| IBP_3_9_IV1(22, "3.9", "IV1", true), | ||
|
|
||
| // Introduce version 1 of the GroupVersion feature (KIP-848). | ||
| IBP_4_0_IV0(21, "4.0", "IV0", false); | ||
| IBP_4_0_IV0(23, "4.0", "IV0", false); | ||
|
|
||
| // NOTES when adding a new version: | ||
| // Update the default version in @ClusterTest annotation to point to the latest version | ||
|
|
@@ -232,7 +244,7 @@ public enum MetadataVersion { | |
| * <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_IV4; | ||
| public static final MetadataVersion LATEST_PRODUCTION = IBP_3_8_IV0; | ||
|
cmccabe marked this conversation as resolved.
|
||
|
|
||
| /** | ||
| * An array containing all of the MetadataVersion entries. | ||
|
|
@@ -331,7 +343,7 @@ public boolean isDirectoryAssignmentSupported() { | |
| } | ||
|
|
||
| public boolean isElrSupported() { | ||
| return this.isAtLeast(IBP_3_8_IV0); | ||
| return this.isAtLeast(IBP_3_9_IV1); | ||
| } | ||
|
|
||
| public boolean isKRaftSupported() { | ||
|
|
@@ -456,7 +468,9 @@ public short offsetForLeaderEpochRequestVersion() { | |
| } | ||
|
|
||
| public short listOffsetRequestVersion() { | ||
| if (this.isAtLeast(IBP_3_5_IV0)) { | ||
| if (this.isAtLeast(IBP_3_9_IV0)) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems that you reverted the fix for ReplicaFetcherThreadTest during merging. Also, PlaintextAdminIntegrationTest.testReplicaCanFetchFromLogStartOffsetAfterDeleteRecords still fails.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both of these tests should pass now. |
||
| return 9; | ||
|
cmccabe marked this conversation as resolved.
|
||
| } else if (this.isAtLeast(IBP_3_5_IV0)) { | ||
| return 8; | ||
| } else if (this.isAtLeast(IBP_3_0_IV1)) { | ||
| return 7; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,7 +74,7 @@ public void testDescribeWithKRaft(ClusterInstance cluster) { | |
| "SupportedMaxVersion: 4.0-IV0\tFinalizedVersionLevel: 3.3-IV1\t", outputWithoutEpoch(features.get(1))); | ||
| } | ||
|
|
||
| @ClusterTest(types = {Type.KRAFT}, metadataVersion = MetadataVersion.IBP_3_7_IV4) | ||
| @ClusterTest(types = {Type.KRAFT}, metadataVersion = MetadataVersion.IBP_3_8_IV0) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we use latestProduction() to avoid having to keep changing it in the future?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't change it here because
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok. In that case, could we add a comment on which MV should be used?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we add a comment that we should use latest production MV for this test?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Honestly I don't think we need to use the latest production MV here. You only need to use an MV that supports bootstrap controllers.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok. Could we add a comment on what MV should be used for this test so that it's clear for future developers?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was this comment addressed?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed it to 3.7-IV0 and added the following comment: |
||
| public void testDescribeWithKRaftAndBootstrapControllers(ClusterInstance cluster) { | ||
| String commandOutput = ToolsTestUtils.captureStandardOut(() -> | ||
| assertEquals(0, FeatureCommand.mainNoExit("--bootstrap-controller", cluster.bootstrapControllers(), "describe")) | ||
|
|
@@ -87,7 +87,7 @@ public void testDescribeWithKRaftAndBootstrapControllers(ClusterInstance cluster | |
|
|
||
| // Change expected message to reflect latest MetadataVersion (SupportedMaxVersion increases when adding a new version) | ||
| assertEquals("Feature: metadata.version\tSupportedMinVersion: 3.0-IV1\t" + | ||
| "SupportedMaxVersion: 4.0-IV0\tFinalizedVersionLevel: 3.7-IV4\t", outputWithoutEpoch(features.get(1))); | ||
| "SupportedMaxVersion: 4.0-IV0\tFinalizedVersionLevel: 3.8-IV0\t", outputWithoutEpoch(features.get(1))); | ||
| } | ||
|
|
||
| @ClusterTest(types = {Type.ZK}, metadataVersion = MetadataVersion.IBP_3_3_IV1) | ||
|
|
@@ -146,7 +146,7 @@ public void testDowngradeMetadataVersionWithKRaft(ClusterInstance cluster) { | |
| ); | ||
| // Change expected message to reflect possible MetadataVersion range 1-N (N increases when adding a new version) | ||
| assertEquals("Could not disable metadata.version. Invalid update version 0 for feature " + | ||
| "metadata.version. Local controller 3000 only supports versions 1-21", commandOutput); | ||
| "metadata.version. Local controller 3000 only supports versions 1-23", commandOutput); | ||
|
cmccabe marked this conversation as resolved.
|
||
|
|
||
| commandOutput = ToolsTestUtils.captureStandardOut(() -> | ||
| assertEquals(1, FeatureCommand.mainNoExit("--bootstrap-server", cluster.bootstrapServers(), | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.