Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[ISSUE #8997] Ensure there is an opportunity to send a retry message when broker no response #9137

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

gaoyf
Copy link
Contributor

@gaoyf gaoyf commented Jan 16, 2025

… response

Which Issue(s) This PR Fixes

Fixes #8997

Brief Description

当broker处于半死不活的状态时(gc,os内存不足等等原因),此时表现无法及时响应客户端的请求。
针对客户端同步发送消息,默认是带有重试策略的。可是此种情况下,客户端可能并没有重试的机会。
详见分析

How Did You Test This Change?

新增的参数sendMsgMaxTimeoutPerRequest,默认情况下不会影响现有的重试逻辑。
模拟broker暂停的情况,并针对各种情况进行了测试,情况如下:
image

RongtongJin
RongtongJin previously approved these changes Jan 17, 2025
Copy link
Contributor

@RongtongJin RongtongJin left a comment

Choose a reason for hiding this comment

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

LGTM

@RongtongJin RongtongJin changed the title Ensure there is an opportunity to send a retry message when broker no response [ISSUE #8997] Ensure there is an opportunity to send a retry message when broker no response Jan 17, 2025
@RongtongJin
Copy link
Contributor

/home/runner/work/rocketmq/rocketmq/client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:783:25: 'if' is not followed by whitespace. [WhitespaceAround]

@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 48.04%. Comparing base (a275510) to head (ab6ca5b).
Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
...mq/client/impl/producer/DefaultMQProducerImpl.java 66.66% 1 Missing and 1 partial ⚠️
...he/rocketmq/client/producer/DefaultMQProducer.java 50.00% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #9137      +/-   ##
=============================================
+ Coverage      47.98%   48.04%   +0.05%     
+ Complexity     12072    12070       -2     
=============================================
  Files           1321     1321              
  Lines          93024    93033       +9     
  Branches       11926    11928       +2     
=============================================
+ Hits           44638    44695      +57     
+ Misses         42880    42809      -71     
- Partials        5506     5529      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gaoyf
Copy link
Contributor Author

gaoyf commented Feb 14, 2025

@RongtongJin @lizhimins How is the progress of this PR?

@RongtongJin
Copy link
Contributor

@RongtongJin @lizhimins How is the progress of this PR?

LGTM~@lizhimins PTAL~

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
4 participants