lucasbru commented on code in PR #20714:
URL: https://github.com/apache/kafka/pull/20714#discussion_r2437029743
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/Group.java:
##########
@@ -111,14 +113,16 @@ static String[] documentValidValues() {
* for consumer groups.
* @param isTransactional Whether the offset commit is
transactional or not.
* @param apiVersion The api version.
+ * @param topicIdPartitions Supplier for a list of topic-partition
pairs being committed.
+ * Topic ids may be ZERO_UUID if the
request does not support them.
*/
void validateOffsetCommit(
String memberId,
String groupInstanceId,
int generationIdOrMemberEpoch,
boolean isTransactional,
- int apiVersion
-
+ int apiVersion,
+ Supplier<List<TopicIdPartition>> topicIdPartitions
Review Comment:
It's only going to be iterated twice if our member epoch is outdated, which
should the minority of the cases. Wouldn't that be a minor performance concern?
Inlining the check later could work, but it does create a bit of complexity,
since we have to go through 6 methods in the commit request handler
- get the group (versions for non-txn vs. txn)
- validate member id / epoch (versions for non-txn vs. txn) -- returns if
member epochs match
- validate assignment epoch -- shortcutted if member epoch match
I can give it a shot
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]