Skip to content

KAFKA-16968: Make 3.8-IV0 a stable MetadataVersion and create 3.9-IV0#16347

Merged
cmccabe merged 16 commits intoapache:trunkfrom
cmccabe:KAFKA-16968
Jun 27, 2024
Merged

KAFKA-16968: Make 3.8-IV0 a stable MetadataVersion and create 3.9-IV0#16347
cmccabe merged 16 commits intoapache:trunkfrom
cmccabe:KAFKA-16968

Conversation

@cmccabe
Copy link
Copy Markdown
Contributor

@cmccabe cmccabe commented Jun 15, 2024

  • Make 3.8-IV0 a stable MetadataVersion

  • Move KIP-966 out of 3.8, reflecting the fact that it's not ready yet.

  • Create IBP_3_9_IV0.

  • Remove IBP_4_0_IV0 since we won't need it until 3.9 is stabilized.

- Make 3.8-IV0 a stable MetadataVersion

- Move KIP-966 out of 3.8, reflecting the fact that it's not ready yet.

- Remove IBP_4_0_IV0 since we won't need it until 3.9 is stabilized.
Copy link
Copy Markdown
Member

@dajac dajac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmccabe Thanks for the patch. I left a few suggestions.

Comment thread server-common/src/main/java/org/apache/kafka/server/common/GroupVersion.java Outdated
@dajac
Copy link
Copy Markdown
Member

dajac commented Jun 17, 2024

cc @jlprat We need this on in 3.8.

@jlprat
Copy link
Copy Markdown
Contributor

jlprat commented Jun 17, 2024

Thanks @dajac! Let's get this to 3.8 once merged

@CalvinLiu7947
Copy link
Copy Markdown
Contributor

@cmccabe @AndrewJSchofield @dajac , there is another PR adding a new metadata version of 3.8.IV1(it will be the next production ready MV), it also tries to move KIP-966 from 3.8IV0 to 4.0IV0. https://github.com/apache/kafka/pull/15673/files
The PR has been modified for quite some time, If we want to make KIP-966 to 3.9IV0, I can do it in a separate PR.

@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Jun 17, 2024

@cmccabe @AndrewJSchofield @dajac , there is another PR adding a new metadata version of 3.8.IV1(it will be the next production ready MV), it also tries to move KIP-966 from 3.8IV0 to 4.0IV0. https://github.com/apache/kafka/pull/15673/files
The PR has been modified for quite some time, If we want to make KIP-966 to 3.9IV0, I can do it in a separate PR.

Thanks for pointing out this existing PR. As discussed on the mailnig list, 3.8 is done at this point. No new features are going into it. The changes from #15673 can be done in 3.9-IV0 once this PR creates it.

@junrao
Copy link
Copy Markdown
Contributor

junrao commented Jun 17, 2024

@cmccabe : #15673 is fixing a mistake that shouldn't be in 3.8.0. We should have bumped up the API version for ListOffset, but we didn't. To me, that seems a blocker for 3.8.0, right?

@jlprat
Copy link
Copy Markdown
Contributor

jlprat commented Jun 18, 2024

hi @junrao I marked https://issues.apache.org/jira/projects/KAFKA/issues/KAFKA-16480 as a blocker for 3.8

Copy link
Copy Markdown
Member

@dajac dajac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. I left a few small comments. Many tests failed too. It looks like that you have to bring back MV 4.0 to a few more places.

Comment thread server-common/src/main/java/org/apache/kafka/server/common/GroupVersion.java Outdated
Comment thread server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java Outdated
@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Jun 18, 2024

@junrao wrote:

@cmccabe : #15673 is fixing a mistake that shouldn't be in 3.8.0. We should have bumped up the API version for ListOffset, but we didn't. To me, that seems a blocker for 3.8.0, right?

The discussion thread here seems to suggest that #15673 is adding a new feature.:

@junrao : To let the AdminClient use this, we need to add a new type of OffsetSpec and a way to set oldestAllowedVersion in ListOffsetsRequest.Build to version 9, right?
@clolov: Yes, correct, but I want to get this PR in before I move to that. I do not want to bunch all of these changes in the same PR

Additionally, the PR title is "KAFKA-16480: Bump ListOffsets version, IBP version and mark last version of ListOffsets as unstable #15673". But when I look at clients/src/main/resources/common/message/ListOffsetsRequest.json in the PR, I do not see "latestVersionUnstable": true.

Maybe someone can explain more about what #15673 does exactly.

@dajac
Copy link
Copy Markdown
Member

dajac commented Jun 18, 2024

@cmccabe I don't see the last changes. Did you push?

@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Jun 18, 2024

@dajac Just pushed. I was running a few tests locally as a check.

@junrao
Copy link
Copy Markdown
Contributor

junrao commented Jun 18, 2024

Maybe someone can explain more about what #15673 does exactly.

@cmccabe : The main issue that #15673 fixes
is described in https://issues.apache.org/jira/browse/KAFKA-16480.

https://issues.apache.org/jira/browse/KAFKA-16154 introduced the changes to the ListOffsets API to accept latest-tiered-timestamp and return the corresponding offset.

Those changes should have a) increased the version of the ListOffsets API b) increased the inter-broker protocol version c) hidden the latest version of the ListOffsets behind the latestVersionUnstable flag

So, let's hold off on merging this PR until we understand how to consolidate it with #15673.

@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Jun 18, 2024

@junrao @clolov @dajac @jlprat : It seems like the client side of the KIP-1005 changes is not implemented. So I would propose we revert #15213 from 3.8 since the KIP is only half-complete, and feature freeze has come and gone. This will unblock the 3.8.0 release.

We can then retarget KIP-1005 at 3.9.0 as usual. As part of that, we can bump the ListOffsets version and mark the latest version of ListOffsets as unstable. This will all be in 3.9-IV0.

I'll update this PR in a moment with those changes

Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmccabe : Thanks for the PR. Added a few comments.

Comment thread server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java Outdated
Comment thread clients/src/main/resources/common/message/ListOffsetsRequest.json
Comment thread core/src/test/scala/unit/kafka/server/ApiVersionsRequestTest.scala Outdated
Comment thread tools/src/test/java/org/apache/kafka/tools/FeatureCommandTest.java Outdated
Comment thread core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala Outdated
Comment thread metadata/src/test/java/org/apache/kafka/metadata/PartitionRegistrationTest.java Outdated
Comment thread server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java Outdated
Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmccabe : Thanks for the updated PR. A few more comments.

Comment thread server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java Outdated
Comment thread tools/src/test/java/org/apache/kafka/tools/FeatureCommandTest.java
Comment thread core/src/test/scala/unit/kafka/server/ApiVersionsRequestTest.scala
@jlprat
Copy link
Copy Markdown
Contributor

jlprat commented Jun 20, 2024

Hi @cmccabe

It seems like the client side of the KIP-1005 changes is not implemented. So I would propose we revert #15213 from 3.8 since the KIP is only half-complete, and feature freeze has come and gone. This will unblock the 3.8.0 release.

Is this the accepted way forward to unlock the 3.8 release? If so, I'll prepare a revert PR.

@junrao
Copy link
Copy Markdown
Contributor

junrao commented Jun 20, 2024

@jlprat : In addition to reverting #15213, it seems that we also need to change LATEST_PRODUCTION to 3.8 in 3.8.0 release.

@jlprat
Copy link
Copy Markdown
Contributor

jlprat commented Jun 20, 2024

@junrao I did both in this PR: #16400
(reverting #15213 and changing LATEST_PRODUCTION to IBP_3_8_IV0)

@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Jun 20, 2024

@jlprat : Is this the accepted way forward to unlock the 3.8 release? If so, I'll prepare a revert PR.

+1

@junrao : In addition to reverting #15213, it seems that we also need to change LATEST_PRODUCTION to 3.8 in 3.8.0 release

Yes. We need to create IBP_3_8_IV0 and mark it as production in 3.8.

Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmccabe : Thanks for the updated PR. Left a few more comments.


@ClusterTemplate("testApiVersionsRequestValidationV0Template")
@ClusterTest(types = Array(Type.KRAFT, Type.CO_KRAFT), metadataVersion = MetadataVersion.IBP_3_7_IV4, serverProperties = Array(
@ClusterTest(types = Array(Type.KRAFT, Type.CO_KRAFT), metadataVersion = MetadataVersion.IBP_3_8_IV0, serverProperties = Array(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Comment thread core/src/test/scala/unit/kafka/server/ListOffsetsRequestTest.scala
}

@ClusterTest(types = {Type.KRAFT}, metadataVersion = MetadataVersion.IBP_3_7_IV4)
@ClusterTest(types = {Type.KRAFT}, metadataVersion = MetadataVersion.IBP_3_8_IV0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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?

Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmccabe : Thanks for the updated PR. Just a minor comment.

}

@ClusterTest(types = {Type.KRAFT}, metadataVersion = MetadataVersion.IBP_3_7_IV4)
@ClusterTest(types = {Type.KRAFT}, metadataVersion = MetadataVersion.IBP_3_8_IV0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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?


public short listOffsetRequestVersion() {
if (this.isAtLeast(IBP_3_5_IV0)) {
if (this.isAtLeast(IBP_3_9_IV0)) {
Copy link
Copy Markdown
Contributor

@junrao junrao Jun 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The following test failed because of this. I guess we need to use IBP_3_9_IV0 in the test.
kafka.server.ReplicaFetcherThreadTest.shouldSendLatestRequestVersionsByDefault()

org.opentest4j.AssertionFailedError: expected: <9> but was: <8>
	at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at app//org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
	at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:134)
	at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:129)
	at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:329)
	at app//kafka.server.ReplicaFetcherThreadTest.shouldSendLatestRequestVersionsByDefault(ReplicaFetcherThreadTest.scala:132)

  1. The following test failed because of this. I guess we need to enable unstable.feature.versions.enable.
org.opentest4j.AssertionFailedError: Expected follower to discover new log start offset 3
	at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
	at app//org.junit.jupiter.api.Assertions.fail(Assertions.java:138)
	at app//kafka.api.PlaintextAdminIntegrationTest.waitForFollowerLog$1(PlaintextAdminIntegrationTest.scala:846)
	at app//kafka.api.PlaintextAdminIntegrationTest.testReplicaCanFetchFromLogStartOffsetAfterDeleteRecords(PlaintextAdminIntegrationTest.scala:868)

org.apache.kafka.common.errors.InvalidRequestException: Received request api key LIST_OFFSETS with version 9 which is not enabled
  1. org.apache.kafka.tiered.storage.integration.ReassignReplicaExpandTest.executeTieredStorageTest seems to fail consistently now for similar reasons.

org.apache.kafka.common.errors.InvalidRequestException: Received request api key LIST_OFFSETS with version 9 which is not enabled

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both of these tests should pass now.

Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmccabe : Thanks for the updated PR. A couple of more comments.


public short listOffsetRequestVersion() {
if (this.isAtLeast(IBP_3_5_IV0)) {
if (this.isAtLeast(IBP_3_9_IV0)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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.

}

@ClusterTest(types = {Type.KRAFT}, metadataVersion = MetadataVersion.IBP_3_7_IV4)
@ClusterTest(types = {Type.KRAFT}, metadataVersion = MetadataVersion.IBP_3_8_IV0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this comment addressed?

Copy link
Copy Markdown
Member

@jolshan jolshan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm as long as the tests look good.

Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmccabe : Thanks for the updated PR. There are quite a few ApiVersionRequest related test failures.

@cmccabe cmccabe merged commit ebaa108 into apache:trunk Jun 27, 2024
@cmccabe cmccabe deleted the KAFKA-16968 branch June 27, 2024 21:03
@dajac
Copy link
Copy Markdown
Member

dajac commented Jun 28, 2024

@cmccabe Do we need to cherry-pick it to 3.8 branch too?

@jlprat
Copy link
Copy Markdown
Contributor

jlprat commented Jun 28, 2024

@dajac my understanding is that we wouldn't need to cherry pick this to 3.8 but rather have #16400 instead.

@dajac
Copy link
Copy Markdown
Member

dajac commented Jun 28, 2024

My understanding is that we still need to create IBP_3_8_IV0 and to update LATEST_PRODUCTION in 3.8 branch. This is orthogonal to #16400.

@jlprat
Copy link
Copy Markdown
Contributor

jlprat commented Jun 28, 2024

@dajac
Copy link
Copy Markdown
Member

dajac commented Jun 28, 2024

Ah, missed them. Then, we're all good. Thanks!

@jlprat
Copy link
Copy Markdown
Contributor

jlprat commented Jun 28, 2024

I decided to add both things in the same PR in an attempt to simplify blockers

*/
@ParameterizedTest
@ValueSource(strings = {"3.4-IV0", "3.5-IV2", "3.6-IV0", "3.7-IV4"})
@ValueSource(strings = {"3.4-IV0", "3.5-IV2", "3.6-IV0", "3.7-IV2"})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmccabe : Is it intentional that we leave out "3.9-IV1" in this test?

soarez added a commit to soarez/kafka that referenced this pull request Jul 5, 2024
LATEST_PRODUCTION version in MetadataVersion.java was updated in
both apache#16347 and apache#16400, but it was left unchanged in the system
tests.
soarez added a commit that referenced this pull request Jul 5, 2024
…16533)

LATEST_PRODUCTION version in MetadataVersion.java was updated in
both #16347 and #16400, but it was left unchanged in the system
tests.

Reviewers: Josep Prat <josep.prat@aiven.io>
soarez added a commit that referenced this pull request Jul 5, 2024
…16533)

LATEST_PRODUCTION version in MetadataVersion.java was updated in
both #16347 and #16400, but it was left unchanged in the system
tests.

Reviewers: Josep Prat <josep.prat@aiven.io>
abhi-ksolves pushed a commit to ksolves/kafka that referenced this pull request Jul 31, 2024
…pache#16533)

LATEST_PRODUCTION version in MetadataVersion.java was updated in
both apache#16347 and apache#16400, but it was left unchanged in the system
tests.

Reviewers: Josep Prat <josep.prat@aiven.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants