-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
KAFKA-8640: Replace OffsetFetch request with automated protocol #7062
Conversation
354add3
to
e454d50
Compare
retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, left a few comments. I think we will need some more thorough test coverage, especially in light of recent regressions.
for (OffsetFetchResponsePartition partition : topic.partitions()) { | ||
responseData.put(new TopicPartition(topic.name(), partition.partitionIndex()), | ||
new PartitionData(partition.committedOffset(), | ||
Optional.of(partition.committedLeaderEpoch()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.. partition.committedLeaderEpoch()
is an int, so this will never be Optional.empty()
. Shouldn't we be using RequestUtils.getLeaderEpoch
?
clients/src/main/java/org/apache/kafka/common/requests/OffsetFetchResponse.java
Outdated
Show resolved
Hide resolved
clients/src/main/java/org/apache/kafka/common/requests/OffsetFetchRequest.java
Outdated
Show resolved
Hide resolved
@hachikuji Addressed comments |
retest this please |
5db9062
to
18b4854
Compare
Flakey test GroupEndToEndAuthorizationTest#testNoDescribeProduceOrConsumeWithoutTopicDescribeAcl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, left a few more comments. I think it would be helpful to have add some round trip test cases in MessageTest
as well. Specifically we can verify round trips which include the all topic case and the different metadata/leader epochs.
clients/src/main/java/org/apache/kafka/common/requests/OffsetFetchRequest.java
Outdated
Show resolved
Hide resolved
clients/src/main/java/org/apache/kafka/common/requests/OffsetFetchRequest.java
Outdated
Show resolved
Hide resolved
clients/src/main/java/org/apache/kafka/common/requests/OffsetFetchRequest.java
Outdated
Show resolved
Hide resolved
clients/src/main/java/org/apache/kafka/common/requests/OffsetFetchResponse.java
Show resolved
Hide resolved
clients/src/test/java/org/apache/kafka/common/requests/OffsetFetchRequestTest.java
Outdated
Show resolved
Hide resolved
clients/src/main/java/org/apache/kafka/common/requests/OffsetFetchRequest.java
Outdated
Show resolved
Hide resolved
clients/src/test/java/org/apache/kafka/common/requests/OffsetFetchRequestTest.java
Show resolved
Hide resolved
clients/src/test/java/org/apache/kafka/common/requests/RequestResponseTest.java
Show resolved
Hide resolved
clients/src/test/java/org/apache/kafka/common/requests/OffsetFetchResponseTest.java
Outdated
Show resolved
Hide resolved
e086e21
to
6dc9c0d
Compare
retest this please |
1/3 green |
retest this please |
retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, just a couple more comments. Would be good to do a system test run covering the following tests: tests/kafkatest/tests/core/compatibility_test_new_broker_test.py
and tests/kafkatest/tests/client/client_compatibility_produce_consume_test.py
.
private static final List<Errors> PARTITION_ERRORS = Collections.singletonList(Errors.UNKNOWN_TOPIC_OR_PARTITION); | ||
|
||
private final Map<TopicPartition, PartitionData> responseData; | ||
public final OffsetFetchResponseData data; | ||
private final Errors error; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this field? Could we construct it from OffsetFetchResponseData
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to store this field because we don't want to do the initialization every time if someone tries to access it. This makes the error construction one-time thing.
Mark that we already got 3/3 green builds. |
Jason mentioned system test builds are both passing: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the patch!
As title.
Committer Checklist (excluded from commit message)