Skip to content
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

MINOR: Fix the flaky testConsumerGroupHeartbeatWithStableClassicGroup by sorting the topic partition list #15816

Conversation

dongnuo123
Copy link
Contributor

We are seeing flaky test in testConsumerGroupHeartbeatWithStableClassicGroup where the error is caused by the different ordering in the expected and actual values. The patch sorts the topic partition list in the records to fix the issue.

https://ci-builds.apache.org/blue/organizations/jenkins/Kafka%2Fkafka-pr/detail/PR-15698/11/tests/

Committer Checklist (excluded from commit message)

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

Copy link
Contributor

@jeffkbkim jeffkbkim 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 fix. LGTM!

@dongnuo123 dongnuo123 changed the title [Minor] Fix the flaky testConsumerGroupHeartbeatWithStableClassicGroup by sorting the topic partition list MINOR: Fix the flaky testConsumerGroupHeartbeatWithStableClassicGroup by sorting the topic partition list Apr 26, 2024
@dajac dajac added the KIP-848 label Apr 26, 2024
@dajac dajac self-requested a review April 26, 2024 19:58
Copy link
Member

@soarez soarez 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 fixing this @dongnuo123!

I checked:

  • Tried locally: 1000 iterations of testConsumerGroupHeartbeatWithStableClassicGroup has no failures without this patch but has some without it
  • No new failed tests in CI
  • Failed tests in CI do not include testConsumerGroupHeartbeatWithStableClassicGroup

These failed tests already had open JIRAs:

  • KAFKA-15960 "testQuotaOverrideDelete(String).quorum=kraft" – kafka.api.ClientIdQuotaTest
  • KAFKA-16174 testDescribeQuorumStatusSuccessful [5] Type=Raft-Combined, MetadataVersion=3.8-IV0, Security=PLAINTEXT – org.apache.kafka.tools.MetadataQuorumCommandTest
  • KAFKA-15793 testMigrateTopicDeletions [1] Type=ZK, MetadataVersion=3.4-IV0, Security=PLAINTEXT – kafka.zk.ZkMigrationIntegrationTest
  • KAFKA-16383 testReplicateFromLatest() – org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationBaseTest
  • KAFKA-15292 testReplicateSourceDefault() – org.apache.kafka.connect.mirror.integration.IdentityReplicationIntegrationTest
  • KAFKA-15897 testWrongIncarnationId() – kafka.server.ControllerRegistrationManagerTest

These didn't, but have now:

  • KAFKA-16630 "testPollReturnsRecords(GroupProtocol).groupProtocol=CLASSIC" – org.apache.kafka.clients.consumer.KafkaConsumerTest
  • KAFKA-16631 testDeleteOffsetsOfStableConsumerGroupWithTopicOnly [1] Type=Raft-Isolated, MetadataVersion=3.8-IV0, Security=PLAINTEXT – org.apache.kafka.tools.consumer.group.DeleteOffsetsConsumerGroupCommandIntegrationTest
  • KAFKA-16632 testDeleteOffsetsOfStableConsumerGroupWithTopicPartition [1] Type=Raft-Isolated, MetadataVersion=3.8-IV0, Security=PLAINTEXT – org.apache.kafka.tools.consumer.group.DeleteOffsetsConsumerGroupCommandIntegrationTest
  • KAFKA-16633 testDescribeExistingGroupWithNoMembers(String, String).quorum=kraft+kip848.groupProtocol=consumer – org.apache.kafka.tools.consumer.group.DescribeConsumerGroupTest
  • KAFKA-16634 testFenceMultipleBrokers() – org.apache.kafka.controller.QuorumControllerTest
  • KAFKA-16635 "shouldThrottleOldSegments(String).quorum=kraft" – kafka.server.ReplicationQuotasTest
  • KAFKA-16636 testStickyTaskAssignorLargePartitionCount – org.apache.kafka.streams.processor.internals.StreamsAssignmentScaleTest

LGTM but will wait for @dajac to review

Copy link
Contributor

@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 994077e into apache:trunk Apr 29, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants