Skip to content

Cherry-pick KAFKA-18583 fix (#18635) to 3.9 #18657

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

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

dimitarndimitrov
Copy link
Contributor

The cherry-pick required reimplementing the accompanying test to work with UpdateMetadataRequest (removed in 4.0 and trunk) in order to also apply to ZkMetadataCache. If the removal of UpdateMetadataRequest is backported here as well, the test can be changed to match the trunk version.

  • The test now passes locally against both the ZK and the KRaft metadata caches.

Conflicts: core/src/test/scala/unit/kafka/server/MetadataCacheTest.scala

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

The cherry-pick required reimplementing the accompanying test to work
with UpdateMetadataRequest (removed in 4.0 and trunk) in order to also
apply to `ZkMetadataCache`. If the removal of UpdateMetadataRequest is
backported here as well, the test can be changed to match the trunk
version.

Conflicts: core/src/test/scala/unit/kafka/server/MetadataCacheTest.scala
@ijuma
Copy link
Member

ijuma commented Jan 21, 2025

If the removal of UpdateMetadataRequest is backported here as well, the test can be changed to match the trunk version.

That is 4.0+ only, so we don't have to worry about that.

Copy link
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.

LGTM, thanks.

@dajac dajac merged commit a92022f into apache:3.9 Jan 22, 2025
1 check failed
dajac pushed a commit that referenced this pull request Jan 22, 2025
The cherry-pick required reimplementing the accompanying test to work
with UpdateMetadataRequest (removed in 4.0 and trunk) in order to also
apply to `ZkMetadataCache`. If the removal of UpdateMetadataRequest is
backported here as well, the test can be changed to match the trunk
version.

Reviewers: David Jacot <[email protected]>
@dajac
Copy link
Member

dajac commented Jan 22, 2025

Merged to 3.9 and 3.8.

Comment on lines +714 to +717
if (expectedReplicaSet.contains(offlineBrokerId)) {
assertEquals(expectedReplicaSet,
replicaSet + offlineBrokerId,
s"Unexpected partial replica set for partition $partitionId")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

nit: This condition should also have asserted that replicaSet doesn't contain offlineBrokerId - right now the existing assertEquals will pass even if that's not the case. Also applies to the original trunk change.

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.

3 participants