Skip to content
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-14247: add handler impl to the prototype #12775

Merged
merged 8 commits into from
Oct 31, 2022

Conversation

philipnee
Copy link
Collaborator

@philipnee philipnee commented Oct 20, 2022

*This is a minor revision for KAFKA-14247. We added how the handler is called and constructed to the prototype code path.

I also added the SubscriptionState instance to elucidate the idea that it is created on the client thread. The subscription() demonstrates that it maintains the same access pattern as the current impl.

Committer Checklist (excluded from commit message)

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

@philipnee philipnee marked this pull request as ready for review October 20, 2022 18:18
Copy link
Contributor

@kirktrue kirktrue left a comment

Choose a reason for hiding this comment

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

Thanks @philipnee!

I assume the bulk of the additions here are copy-and-pasted from the existing KafkaConsumer?

…als/PrototypeAsyncConsumer.java

Co-authored-by: Kirk True <kirk@kirktrue.pro>
Copy link
Contributor

@vvcephei vvcephei 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, @philipnee !

I had a couple of small suggestions.

Do you think it's possible to also include a quick test to demonstrate that the code in this PR is effective?

@philipnee
Copy link
Collaborator Author

Added a test for the subscription() method. It's a bit complicated to test other method as the class is still Abstract.

@@ -64,27 +64,6 @@ public class DefaultBackgroundThread extends KafkaThread {
private final AtomicReference<Optional<RuntimeException>> exception =
new AtomicReference<>(Optional.empty());

public DefaultBackgroundThread(final ConsumerConfig config,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removing unused constructor for now.

Copy link
Contributor

@vvcephei vvcephei left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks, @philipnee .

@vvcephei
Copy link
Contributor

I don't see how it could be related, but Gradle got a bunch of OOMEs on your last test run, so I kicked it off again.

@vvcephei
Copy link
Contributor

All right, thanks for that fix, @philipnee !

This time, the failures look unrelated:



Build / JDK 11 and Scala 2.13 / kafka.api.TransactionsTest.testFailureToFenceEpoch(String).quorum=kraft | 51 sec | 1
-- | -- | --
Build / JDK 11 and Scala 2.13 / org.apache.kafka.trogdor.coordinator.CoordinatorTest.testTaskRequestWithOldStartMsGetsUpdated() | 2 min 0 sec | 1
Build  / JDK 17 and Scala 2.13 /  org.apache.kafka.connect.integration.ConnectorRestartApiIntegrationTest.testMultiWorkerRestartOnlyConnector | 2 min 19 sec | 1

[Build / JDK 11 and Scala 2.13 / kafka.api.TransactionsTest.testFailureToFenceEpoch(String).quorum=kraft](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12775/9/testReport/kafka.api/TransactionsTest/Build___JDK_11_and_Scala_2_13___testFailureToFenceEpoch_String__quorum_kraft/)	51 sec	[1](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12775/9/)
 [Build / JDK 11 and Scala 2.13 / org.apache.kafka.trogdor.coordinator.CoordinatorTest.testTaskRequestWithOldStartMsGetsUpdated()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12775/9/testReport/org.apache.kafka.trogdor.coordinator/CoordinatorTest/Build___JDK_11_and_Scala_2_13___testTaskRequestWithOldStartMsGetsUpdated__/)	2 min 0 sec	[1](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12775/9/)
 [Build / JDK 17 and Scala 2.13 / org.apache.kafka.connect.integration.ConnectorRestartApiIntegrationTest.testMultiWorkerRestartOnlyConnector](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12775/9/testReport/org.apache.kafka.connect.integration/ConnectorRestartApiIntegrationTest/Build___JDK_17_and_Scala_2_13___testMultiWorkerRestartOnlyConnector/)	2 min 19 sec	[1](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12775/9/)

I'll go ahead and merge.

@vvcephei vvcephei merged commit fa10e21 into apache:trunk Oct 31, 2022
guozhangwang pushed a commit to guozhangwang/kafka that referenced this pull request Jan 25, 2023
Minor revision for KAFKA-14247. Added how the handler is called and constructed to the prototype code path.

Reviewers: John Roesler <vvcephei@apache.org>, Kirk True <kirk@mustardgrain.com>
rutvijmehta-harness pushed a commit to rutvijmehta-harness/kafka that referenced this pull request Feb 9, 2024
Minor revision for KAFKA-14247. Added how the handler is called and constructed to the prototype code path.

Reviewers: John Roesler <vvcephei@apache.org>, Kirk True <kirk@mustardgrain.com>
rutvijmehta-harness added a commit to rutvijmehta-harness/kafka that referenced this pull request Feb 9, 2024
Minor revision for KAFKA-14247. Added how the handler is called and constructed to the prototype code path.

Reviewers: John Roesler <vvcephei@apache.org>, Kirk True <kirk@mustardgrain.com>

Co-authored-by: Philip Nee <pnee@confluent.io>
rutvijmehta-harness added a commit to rutvijmehta-harness/kafka that referenced this pull request Feb 10, 2024
Minor revision for KAFKA-14247. Added how the handler is called and constructed to the prototype code path.

Reviewers: John Roesler <vvcephei@apache.org>, Kirk True <kirk@mustardgrain.com>

Co-authored-by: Philip Nee <pnee@confluent.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants