You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "AndrewJSchofield (via GitHub)" <gi...@apache.org> on 2024/08/02 20:48:53 UTC
[PR] KAFKA-17247: Revised share group record schemas [DO NOT MERGE] [kafka]
AndrewJSchofield opened a new pull request, #16786:
URL: https://github.com/apache/kafka/pull/16786
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)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-17247: Revised share group record schemas [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #16786:
URL: https://github.com/apache/kafka/pull/16786#discussion_r1713462665
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorShard.java:
##########
@@ -790,6 +806,27 @@ public void replay(
);
break;
+ case 12:
+ groupMetadataManager.replay(
+ (ShareGroupTargetAssignmentMetadataKey) key.message(),
+ (ShareGroupTargetAssignmentMetadataValue) Utils.messageOrNull(value)
+ );
+ break;
+
+ case 13:
+ groupMetadataManager.replay(
+ (ShareGroupTargetAssignmentMemberKey) key.message(),
+ (ShareGroupTargetAssignmentMemberValue) Utils.messageOrNull(value)
+ );
+ break;
+
+ case 14:
+ groupMetadataManager.replay(
+ (ShareGroupCurrentMemberAssignmentKey) key.message(),
+ (ShareGroupCurrentMemberAssignmentValue) Utils.messageOrNull(value)
+ );
+ break;
+
Review Comment:
Pardon me, why `ShareGroupStatePartitionMetadataValue` (version 15) does not join this party? or it is a future work.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-17247: Revised share group record schemas [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #16786:
URL: https://github.com/apache/kafka/pull/16786
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-17247: Revised share group record schemas [kafka]
Posted by "AndrewJSchofield (via GitHub)" <gi...@apache.org>.
AndrewJSchofield commented on code in PR #16786:
URL: https://github.com/apache/kafka/pull/16786#discussion_r1713554035
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorShard.java:
##########
@@ -790,6 +806,27 @@ public void replay(
);
break;
+ case 12:
+ groupMetadataManager.replay(
+ (ShareGroupTargetAssignmentMetadataKey) key.message(),
+ (ShareGroupTargetAssignmentMetadataValue) Utils.messageOrNull(value)
+ );
+ break;
+
+ case 13:
+ groupMetadataManager.replay(
+ (ShareGroupTargetAssignmentMemberKey) key.message(),
+ (ShareGroupTargetAssignmentMemberValue) Utils.messageOrNull(value)
+ );
+ break;
+
+ case 14:
+ groupMetadataManager.replay(
+ (ShareGroupCurrentMemberAssignmentKey) key.message(),
+ (ShareGroupCurrentMemberAssignmentValue) Utils.messageOrNull(value)
+ );
+ break;
+
Review Comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-17247: Revised share group record schemas [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #16786:
URL: https://github.com/apache/kafka/pull/16786#issuecomment-2286853475
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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-17247: Revised share group record schemas [kafka]
Posted by "junrao (via GitHub)" <gi...@apache.org>.
junrao commented on code in PR #16786:
URL: https://github.com/apache/kafka/pull/16786#discussion_r1714166779
##########
group-coordinator/src/main/resources/common/message/ShareGroupPartitionMetadataValue.json:
##########
@@ -20,25 +20,21 @@
"validVersions": "0",
"flexibleVersions": "0+",
"fields": [
- { "name": "InitializedTopics", "versions": "0+", "type": "[]TopicPartitionsInfo",
- "about": "The topics with initialized share-group state." },
- { "name": "DeletingTopics", "versions": "0+", "type": "[]TopicInfo",
- "about": "The topics whose share-group state is being deleted." }
- ],
- "commonStructs": [
- { "name": "TopicPartitionsInfo", "versions": "0+", "fields": [
- { "name": "TopicId", "type": "uuid", "versions": "0+",
- "about": "The topic identifier." },
- { "name": "TopicName", "type": "string", "versions": "0+",
+ { "name": "Topics", "versions": "0+", "type": "[]TopicMetadata",
Review Comment:
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?
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/Assignment.java:
##########
@@ -85,4 +86,20 @@ public static Assignment fromRecord(
topicPartitions -> new HashSet<>(topicPartitions.partitions())))
);
}
+
+ /**
+ * Creates a {{@link Assignment}} from a {{@link ConsumerGroupTargetAssignmentMemberValue}}.
Review Comment:
Incorrect reference `ConsumerGroupTargetAssignmentMemberValue`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-17247: Revised share group record schemas [kafka]
Posted by "AndrewJSchofield (via GitHub)" <gi...@apache.org>.
AndrewJSchofield commented on code in PR #16786:
URL: https://github.com/apache/kafka/pull/16786#discussion_r1714833667
##########
group-coordinator/src/main/resources/common/message/ShareGroupPartitionMetadataValue.json:
##########
@@ -20,25 +20,21 @@
"validVersions": "0",
"flexibleVersions": "0+",
"fields": [
- { "name": "InitializedTopics", "versions": "0+", "type": "[]TopicPartitionsInfo",
- "about": "The topics with initialized share-group state." },
- { "name": "DeletingTopics", "versions": "0+", "type": "[]TopicInfo",
- "about": "The topics whose share-group state is being deleted." }
- ],
- "commonStructs": [
- { "name": "TopicPartitionsInfo", "versions": "0+", "fields": [
- { "name": "TopicId", "type": "uuid", "versions": "0+",
- "about": "The topic identifier." },
- { "name": "TopicName", "type": "string", "versions": "0+",
+ { "name": "Topics", "versions": "0+", "type": "[]TopicMetadata",
Review Comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org