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-7859: Use automatic RPC generation in LeaveGroups #6188

Merged
merged 2 commits into from
Jan 31, 2019

Conversation

abbccdda
Copy link
Contributor

This pr serves as a sub task of JIRA: https://issues.apache.org/jira/browse/KAFKA-7830 to eventually replace all the hand-coded request/response interfaces with Colin's new automated generation protocols. There are still some dependencies of this pr over #5972, so we shall wait until it lands to continue address some minor issues.

Committer Checklist (excluded from commit message)

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

@abbccdda abbccdda force-pushed the leave_group branch 2 times, most recently from 213c27c to 5c02d47 Compare January 24, 2019 05:15
@dhruvilshah3
Copy link
Contributor

Thanks for the PR. Could you please rebase on trunk?

@abbccdda
Copy link
Contributor Author

@dhruvilshah3 this depends on another diff that will be landed to trunk soon. Waiting for that one to merge first.

@abbccdda
Copy link
Contributor Author

@cmccabe @dhruvilshah3 Hey Colin and Dhruvil, do you mind taking a look of this change?

@abbccdda abbccdda force-pushed the leave_group branch 2 times, most recently from 030c566 to d18533b Compare January 28, 2019 21:24
@@ -433,7 +434,7 @@ class RequestQuotaTest extends BaseRequestTest {
case ApiKeys.FIND_COORDINATOR => new FindCoordinatorResponse(response).throttleTimeMs
case ApiKeys.JOIN_GROUP => new JoinGroupResponse(response).throttleTimeMs
case ApiKeys.HEARTBEAT => new HeartbeatResponse(response).throttleTimeMs
case ApiKeys.LEAVE_GROUP => new LeaveGroupResponse(response).throttleTimeMs
case ApiKeys.LEAVE_GROUP => new LeaveGroupResponse(response, 2).throttleTimeMs
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it make sense to use the latest version of LeaveGroupResponse here? Something like LeaveGroupResponseData.SCHEMAS.length - 1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good to me!

@cmccabe
Copy link
Contributor

cmccabe commented Jan 29, 2019

Hi @abbccdda, looks good! I left one comment. LGTM after that.

@abbccdda
Copy link
Contributor Author

FYI, I fixed the test to use latest schema version for both LeaveGroup and ElectPreferredLeaders @cmccabe

@abbccdda
Copy link
Contributor Author

@cmccabe Hey Colin, would you mind taking another look?

@cmccabe
Copy link
Contributor

cmccabe commented Jan 31, 2019

LGTM. Thanks, @abbccdda !

@cmccabe cmccabe merged commit dc634f1 into apache:trunk Jan 31, 2019
@abbccdda
Copy link
Contributor Author

@cmccabe Great thank you!!

jarekr pushed a commit to confluentinc/kafka that referenced this pull request Apr 18, 2019
* AK/trunk:
  fix typo (apache#5150)
  MINOR: Reduce replica.fetch.backoff.ms in ReassignPartitionsClusterTest (apache#5887)
  KAFKA-7766: Fail fast PR builds (apache#6059)
  KAFKA-7798: Expose embedded clientIds (apache#6107)
  KAFKA-7641; Introduce "group.max.size" config to limit group sizes (apache#6163)
  KAFKA-7433; Introduce broker options in TopicCommand to use AdminClient (KIP-377)
  MINOR: Fix some field definitions for ListOffsetReponse (apache#6214)
  KAFKA-7873; Always seek to beginning in KafkaBasedLog (apache#6203)
  KAFKA-7719: Improve fairness in SocketServer processors (KIP-402) (apache#6022)
  MINOR: fix checkstyle suppressions for generated RPC code to work on Windows
  KAFKA-7859: Use automatic RPC generation in LeaveGroups (apache#6188)
  KAFKA-7652: Part II; Add single-point query for SessionStore and use for flushing / getter (apache#6161)
  KAFKA-3522: Add RocksDBTimestampedStore (apache#6149)
  KAFKA-3522: Replace RecordConverter with TimestampedBytesStore (apache#6204)
pengxiaolong pushed a commit to pengxiaolong/kafka that referenced this pull request Jun 14, 2019
Reviewed-by: Colin P. McCabe <cmccabe@apache.org>
hachikuji pushed a commit that referenced this pull request Jul 22, 2019
…onse (#7101)

This is a bug fix PR to resolve errors introduced in #6188. The PR fixes 2 things:

1. throttle time should be set on version >= 1 instead of version >= 2
2. `getErrorResponse` should set throwable exception within LeaveGroupResponseData

The patch also adds more unit tests to guarantee correctness for leave group protocol.

Reviewers: Guozhang Wang <wangguoz@gmail.com>, Jason Gustafson <jason@confluent.io>
hachikuji pushed a commit that referenced this pull request Jul 22, 2019
…onse (#7101)

This is a bug fix PR to resolve errors introduced in #6188. The PR fixes 2 things:

1. throttle time should be set on version >= 1 instead of version >= 2
2. `getErrorResponse` should set throwable exception within LeaveGroupResponseData

The patch also adds more unit tests to guarantee correctness for leave group protocol.

Reviewers: Guozhang Wang <wangguoz@gmail.com>, Jason Gustafson <jason@confluent.io>
hachikuji pushed a commit that referenced this pull request Jul 22, 2019
…onse (#7101)

This is a bug fix PR to resolve errors introduced in #6188. The PR fixes 2 things:

1. throttle time should be set on version >= 1 instead of version >= 2
2. `getErrorResponse` should set throwable exception within LeaveGroupResponseData

The patch also adds more unit tests to guarantee correctness for leave group protocol.

Reviewers: Guozhang Wang <wangguoz@gmail.com>, Jason Gustafson <jason@confluent.io>
xiowu0 pushed a commit to linkedin/kafka that referenced this pull request Aug 22, 2019
…n throttling and error response (apache#7101)

TICKET = KAFKA-8678
LI_DESCRIPTION =
EXIT_CRITERIA = HASH [f94ec1c]
ORIGINAL_DESCRIPTION =

This is a bug fix PR to resolve errors introduced in apache#6188. The PR fixes 2 things:

1. throttle time should be set on version >= 1 instead of version >= 2
2. `getErrorResponse` should set throwable exception within LeaveGroupResponseData

The patch also adds more unit tests to guarantee correctness for leave group protocol.

Reviewers: Guozhang Wang <wangguoz@gmail.com>, Jason Gustafson <jason@confluent.io>
(cherry picked from commit f94ec1c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants