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

support RequestCode GET_CONSUMER_STATUS_FROM_CLIENT #985

Merged
merged 1 commit into from
May 6, 2023

Conversation

NeonToo
Copy link
Contributor

@NeonToo NeonToo commented Jan 12, 2023

What is the purpose of the change

Support RequestCode GET_CONSUMER_STATUS_FROM_CLIENT

  • Broker RequestCode INVOKE_BROKER_TO_GET_CONSUMER_STATUS will invoke each individual consumer to get
    which message queues the consumer instance is processing
  • Client is supposed to handle GET_CONSUMER_STATUS_FROM_CLIENT from Broker to return the Map of <MessageQueue, MemoryOffset> for the purpose of previous step

Brief changelog

  • push_consumer pull_consumer implements getConsumerStatus(topic string, group string) *ConsumerStatus
  • offset_store implements getMQOffsetMap(topic string) map[primitive.MessageQueue]int64 for consumer to get the MQOffsetMap

Verifying this change

XXXX

Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when a cross-module dependency exists.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

@codecov-commenter
Copy link

Codecov Report

Merging #985 (bd5a6de) into master (896a8a3) will decrease coverage by 0.32%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #985      +/-   ##
==========================================
- Coverage   23.32%   23.00%   -0.33%     
==========================================
  Files          52       52              
  Lines        7266     7369     +103     
==========================================
  Hits         1695     1695              
- Misses       5339     5442     +103     
  Partials      232      232              
Impacted Files Coverage Δ
consumer/mock_offset_store.go 30.61% <0.00%> (-5.98%) ⬇️
consumer/offset_store.go 61.32% <0.00%> (-3.82%) ⬇️
consumer/pull_consumer.go 0.00% <0.00%> (ø)
consumer/push_consumer.go 12.47% <0.00%> (-0.09%) ⬇️
internal/client.go 0.16% <0.00%> (-0.01%) ⬇️
internal/model.go 46.22% <0.00%> (-7.04%) ⬇️
internal/request.go 1.53% <0.00%> (-0.09%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@guyinyou guyinyou left a comment

Choose a reason for hiding this comment

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

LGTM

@maixiaohai
Copy link
Contributor

hi @NeonToo the code is ok, could you link an related issue

@NeonToo
Copy link
Contributor Author

NeonToo commented May 6, 2023

related #1045

@ShannonDing ShannonDing merged commit 1d86ea6 into apache:master May 6, 2023
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.

None yet

5 participants