Skip to content

KAFKA-17247: Revised share group record schemas #16786

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 8 commits into from
Aug 13, 2024

Conversation

AndrewJSchofield
Copy link
Member

In KIP-932, the group coordinator does not persist assignments for share groups. While this sounds like a good idea in terms of minimising overhead for data which doesn't strictly need to be recoverable, it significantly adds to the complexity of working with the coordinator framework.

This PR revises the definitions of the share group record schemas following more closely the schemas used for consumer groups, and eliminating the need to maintain soft state alongside the group coordinator's timeline structure.

Committer Checklist (excluded from commit message)

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

@AndrewJSchofield AndrewJSchofield changed the title KAFKA-17247: Revised share group record schemas [DO NOT MERGE] KAFKA-17247: Revised share group record schemas Aug 5, 2024
@apoorvmittal10 apoorvmittal10 added the KIP-932 Queues for Kafka label Aug 5, 2024
Copy link
Contributor

@apoorvmittal10 apoorvmittal10 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 PR @AndrewJSchofield. LGTM.

Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

LGTM. the failed streams tests are fixed by #16857 and one small question is left.

BTW, there are many similar code. I guess that is the side effect of reducing the complexity for coordinator framework :(

(ShareGroupCurrentMemberAssignmentValue) Utils.messageOrNull(value)
);
break;

Copy link
Member

Choose a reason for hiding this comment

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

Pardon me, why ShareGroupStatePartitionMetadataValue (version 15) does not join this party? or it is a future work.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's in a later PR (possibly AK 4.1). That record type will be used to keep track of which partitions are being tracked by the share coordinator. I'll update KIP-932 with these revised definitions soon.

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

@AndrewJSchofield : Thanks for the PR. Left a couple of comments.

{ "name": "TopicId", "type": "uuid", "versions": "0+",
"about": "The topic identifier." },
{ "name": "TopicName", "type": "string", "versions": "0+",
{ "name": "Topics", "versions": "0+", "type": "[]TopicMetadata",
Copy link
Contributor

Choose a reason for hiding this comment

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

This matches ConsumerGroupPartitionMetadataValue for tracking the last know topic/partition metadata. However, InitializedTopics and DeletingTopics were designed for keeping track of the pending state needed for the Persister. How is the functionality achieved now?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's because the previous ShareGroupPartitionMetadata in the KIP has become the new ShareGroupStatePartitionMetadata. This is because the pattern is that every record in KIP-848 which has the name ConsumerGroupXXXX has an equivalent ShareGroupXXXX, and ConsumerGroupPartitionMetadata needed an equivalent called ShareGroupPartitionMetadata. Thus, I needed a new name for the previous ShareGroupPartitionMetadata, but the way it works has not changed. I will update the KIP shortly.

@chia7712
Copy link
Member

the failed tests are traced by https://issues.apache.org/jira/browse/KAFKA-15071 https://issues.apache.org/jira/browse/KAFKA-17265 https://issues.apache.org/jira/browse/KAFKA-10725 https://issues.apache.org/jira/browse/KAFKA-16634 https://issues.apache.org/jira/browse/KAFKA-16024 https://issues.apache.org/jira/browse/KAFKA-17334

I run the following command to test the failed tests on my local.

./gradlew cleanTest :streams:test --tests StoreQueryIntegrationTest.shouldQuerySpecificStalePartitionStoresMultiStreamThreads :tools:test --tests LeaderElectionCommandTest.testPreferredReplicaElection --tests TopicCommandIntegrationTest.testDescribeAtMinIsrPartitions :metadata:test --tests QuorumControllerTest.testBootstrapZkMigrationRecord --tests QuorumControllerTest.testFenceMultipleBrokers :core:test --tests SaslMultiMechanismConsumerTest.testCoordinatorFailover --tests SaslPlainPlaintextConsumerTest.testCoordinatorFailover --tests ZkMigrationFailoverTest.testDriverSkipsEventsFromOlderEpoch --tests SslConsumerTest.testCoordinatorFailover :clients:test --tests MemoryRecordsBuilderTest.testBuffersDereferencedOnClose

all pass. will merge this PR

@chia7712 chia7712 merged commit 8d29bc1 into apache:trunk Aug 13, 2024
1 check failed
@AndrewJSchofield AndrewJSchofield deleted the KAFKA-17247 branch September 10, 2024 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
KIP-932 Queues for Kafka
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants