Skip to content

Conversation

li-xiao-shuang
Copy link
Member

fix : #2435

  1. Add the default namesrvAddr to the RequestProducer example
  2. Solve the synchronization wait timeout problem because the semaphore does not decrease after DefaultMQProducer#request() message is sent successfully
  3. Solve the problem that the callback method is not called after the DefaultMQProducer#request() message is sent successfully

@li-xiao-shuang li-xiao-shuang changed the title [ISSUE #2435] Fix message callback timeout bug [ISSUE #2435] Solve the problem that DefaultMQProducer#request() sends messages and waits for timeout synchronously May 13, 2022
@coveralls
Copy link

coveralls commented May 13, 2022

Coverage Status

Coverage decreased (-0.06%) to 52.195% when pulling 7765d30 on li-xiao-shuang:feature_#2435 into 9445b78 on apache:develop.

Copy link
Member

@hzh0425 hzh0425 left a comment

Choose a reason for hiding this comment

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

According to the above logic, should 'putResponseMessage' also be called in line 1443? and the following request has the same problem?
image

@li-xiao-shuang
Copy link
Member Author

According to the above logic, should 'putResponseMessage' also be called in line 1443? and the following request has the same problem? image

Yes, I will deal with this separately. The other interfaces are special. I am still familiar with MQ

@codecov-commenter
Copy link

codecov-commenter commented May 14, 2022

Codecov Report

Merging #4313 (7765d30) into develop (9445b78) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@              Coverage Diff              @@
##             develop    #4313      +/-   ##
=============================================
- Coverage      48.18%   48.14%   -0.04%     
+ Complexity      5085     5072      -13     
=============================================
  Files            642      642              
  Lines          42780    42782       +2     
  Branches        5599     5599              
=============================================
- Hits           20614    20598      -16     
- Misses         19650    19670      +20     
+ Partials        2516     2514       -2     
Impacted Files Coverage Δ
...mq/client/impl/producer/DefaultMQProducerImpl.java 44.32% <0.00%> (-0.11%) ⬇️
...rg/apache/rocketmq/common/stats/StatsSnapshot.java 84.61% <0.00%> (-15.39%) ⬇️
...ache/rocketmq/common/stats/MomentStatsItemSet.java 39.13% <0.00%> (-13.05%) ⬇️
.../apache/rocketmq/common/stats/MomentStatsItem.java 38.09% <0.00%> (-9.53%) ⬇️
...va/org/apache/rocketmq/common/stats/StatsItem.java 50.83% <0.00%> (-5.00%) ⬇️
...org/apache/rocketmq/common/stats/StatsItemSet.java 44.77% <0.00%> (-2.99%) ⬇️
...mq/client/impl/consumer/RebalanceLitePullImpl.java 72.05% <0.00%> (-1.48%) ⬇️
...e/rocketmq/client/impl/consumer/RebalanceImpl.java 43.75% <0.00%> (-0.79%) ⬇️
...a/org/apache/rocketmq/store/StoreStatsService.java 36.97% <0.00%> (-0.57%) ⬇️
...ent/impl/consumer/DefaultLitePullConsumerImpl.java 68.79% <0.00%> (-0.52%) ⬇️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9445b78...7765d30. Read the comment docs.

@hzh0425
Copy link
Member

hzh0425 commented May 14, 2022

According to the above logic, should 'putResponseMessage' also be called in line 1443? and the following request has the same problem? image

Yes, I will deal with this separately. The other interfaces are special. I am still familiar with MQ

Okay, nice try

@duhenglucky duhenglucky merged commit 1f71c39 into apache:develop Jun 6, 2022
@duhenglucky duhenglucky added this to the 4.9.4 milestone Jun 6, 2022
madongming1001 pushed a commit to madongming1001/rocketmq that referenced this pull request Jun 6, 2022
…) sends messages and waits for timeout synchronously (apache#4313)

* Fix message callback timeout bug

* Clean up code format

* Fix message callback timeout bug

Co-authored-by: Heng Du <[email protected]>
GenerousMan pushed a commit to GenerousMan/rocketmq that referenced this pull request Aug 12, 2022
…) sends messages and waits for timeout synchronously (apache#4313)

* Fix message callback timeout bug

* Clean up code format

* Fix message callback timeout bug

Co-authored-by: Heng Du <[email protected]>
@martincao12
Copy link

martincao12 commented Sep 1, 2022

这么修改相当于在执行sendCallback的onSuccess的时候就立即执行了requestResponseFuture的putResponseMessage或者executeRequestCallback,这俩不是应该在收到replyMsg之后再执行吗,即ClientRemotingProcessor里processReplyMessage做的事情?看Issue #2435里的报错,是因为broker reply msg的时候,request请求的producer已经unregister了。 cc @duhenglucky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After calling the message request method of defaultmqproducer, the response data failed due to channel unregister
6 participants