KAFKA-16713: Define initial set of RPCs for KIP-932#16022
KAFKA-16713: Define initial set of RPCs for KIP-932#16022omkreddy merged 4 commits intoapache:trunkfrom
Conversation
|
Should we wait until we cut the 3.8 branch before merging those? If we don't wait, I suggest to mark all the new versions as unstable until they are implemented. |
|
Yes, we will wait until we cut the 3.8 branch before merging. |
apoorvmittal10
left a comment
There was a problem hiding this comment.
Thanks for the PR. LGTM, minor comments.
| */ | ||
| package org.apache.kafka.common.errors; | ||
|
|
||
| public class FencedStateEpochException extends ApiException { |
There was a problem hiding this comment.
Can we please have the comments for the exception class as like InvalidRecordStateException class defined in the PR. Sorry for missing this earlier but seems this error class is not defined in the KIP though others are.
| ); | ||
| } | ||
|
|
||
| public static List<ShareGroupDescribeResponseData.DescribedGroup> getErrorDescribedGroupList( |
There was a problem hiding this comment.
Generally I have received feedback of not including get in such getters so may be rename method to errorDescribedGroupList.
There was a problem hiding this comment.
This class matches the similar ConsumerGroupDescribeRequest so I think it's best to leave it in the name of consistency.
| // Version 5 adds support for new error code TRANSACTION_ABORTABLE (KIP-890). | ||
| "validVersions": "0-5", | ||
| // | ||
| // Version 6 adds support for share groups (KIP-932). |
There was a problem hiding this comment.
We might want to update KIP with version 6 as KIP says version 5 is added for KIP-932.
There was a problem hiding this comment.
Yes, I will do a KIP update once all of the IDs are confirmed by the merge. Essentially, KIP-890 overtook KIP-932.
|
looks compilation failure after |
dcf69eb to
e9b9591
Compare
|
There are 2 test failures introduced by this PR. I'll get them fixed. |
f917fd4 to
9cbfc2f
Compare
omkreddy
left a comment
There was a problem hiding this comment.
@AndrewJSchofield Thanks for the PR. LGTM
|
Test failures are not related to this PR: https://ci-builds.apache.org/blue/organizations/jenkins/Kafka%2Fkafka-pr/detail/PR-16022/6/tests |
This PR defines the initial set of RPCs for KIP-932. The RPCs for the admin client and state management are not in this PR. Reviewers: Apoorv Mittal <amittal@confluent.io>, Manikumar Reddy <manikumar.reddy@gmail.com>
This PR defines the initial set of RPCs for KIP-932. The RPCs for the admin client and state management are not in this PR. Reviewers: Apoorv Mittal <amittal@confluent.io>, Manikumar Reddy <manikumar.reddy@gmail.com>
This PR defines the initial set of RPCs for KIP-932. The RPCs for the admin client and state management are not in this PR. Reviewers: Apoorv Mittal <amittal@confluent.io>, Manikumar Reddy <manikumar.reddy@gmail.com>
| return counts; | ||
| } | ||
|
|
||
| public LinkedHashMap<TopicIdPartition, ShareFetchResponseData.PartitionData> responseData(Map<Uuid, String> topicNames) { |
There was a problem hiding this comment.
just curious. The cached responseData is created according to input topicNames. It will return same object even though we use different input, and hence I'm not sure how we will use it? If that ShareFetchResponse will share everywhere, it will be error-prone. If ShareFetchResponse is used as a local variable, the cache seems to be useless.
Please correct me if I misunderstand anything.
There was a problem hiding this comment.
I agree, method will reply with previous parsed response irrespective of input. However I see similar issue in FetchResponse.java. Though for ShareFetch this method will be used only in tests for now but either we should fix or atleast write the expectations from the method in javadoc.
@adixitconfluent @AndrewJSchofield wdyt? I can write the javadoc with expectations in next PR if that we agrees with.
There was a problem hiding this comment.
This is true, but it is derived from FetchResponse. @apoorvmittal10's suggestion works for me.
There was a problem hiding this comment.
I see similar issue in FetchResponse.java.
yes, I have filed a jira https://issues.apache.org/jira/browse/KAFKA-16684 for it. Also, there is already a PR #15966
@apoorvmittal10's suggestion works for me.
sounds good to me too
junrao
left a comment
There was a problem hiding this comment.
@AndrewJSchofield : Thanks for the PR and sorry for the late review. Left a comment below.
| "about": "First offset of batch of records to acknowledge."}, | ||
| { "name": "LastOffset", "type": "int64", "versions": "0+", | ||
| "about": "Last offset (inclusive) of batch of records to acknowledge."}, | ||
| { "name": "AcknowledgeTypes", "type": "[]int8", "versions": "0+", |
There was a problem hiding this comment.
@AndrewJSchofield : I am wondering why AcknowledgeTypes is an array instead of just an int8. This forces every record to be acked individually and I thought we want to optimize the case that multiple records are of the same ack type.
There was a problem hiding this comment.
@junrao As it says in the KIP, AcknowledgeTypes can consist of a single value which applies to all entries in the batch, or a separate value for each offset in the batch. By making it an array, we have the option of optimising with a single entry in the common case where multiple records are of the same ack type, but we can also accommodate the case where they differ simply by adding more entries to the array.
This PR defines the initial set of RPCs for KIP-932. The RPCs for the admin client and state management are not in this PR.
Committer Checklist (excluded from commit message)