You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2023/01/10 03:07:48 UTC

[GitHub] [rocketmq] cserwen opened a new pull request, #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

cserwen opened a new pull request, #5845:
URL: https://github.com/apache/rocketmq/pull/5845

   **Make sure set the target branch to `develop`**
   
   ## What is the purpose of the change
   
   fix #5838 
   
   ## Brief changelog
   
   XX
   
   ## 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`.
   
   - [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) 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. 
   - [x] 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.
   - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/rocketmq/tree/master/test).
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install -DskipITs` to make sure unit-test pass. Run `mvn clean test-compile failsafe:integration-test`  to make sure integration-test pass.
   - [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] ShadowySpirits commented on a diff in pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

Posted by GitBox <gi...@apache.org>.
ShadowySpirits commented on code in PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#discussion_r1065315568


##########
client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java:
##########
@@ -72,7 +72,8 @@ public class DefaultMQProducer extends ClientConfig implements MQProducer {
         ResponseCode.SYSTEM_ERROR,
         ResponseCode.NO_PERMISSION,
         ResponseCode.NO_BUYER_ID,
-        ResponseCode.NOT_IN_CURRENT_UNIT
+        ResponseCode.NOT_IN_CURRENT_UNIT,
+        ResponseCode.SYSTEM_BUSY

Review Comment:
   How about removing TOPIC_NOT_EXIST?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] wz2cool commented on pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

Posted by "wz2cool (via GitHub)" <gi...@apache.org>.
wz2cool commented on PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#issuecomment-1408038481

   > > > > @cserwen
   > > > > we have lot of disussion about it, plz see #2726 , I think you can add SYSTEM_BUSY using addRetryResponseCode method by yourself . you can see my changes #2729
   > > > > ![image](https://user-images.githubusercontent.com/11556152/213111685-e664580c-f2a0-4cc8-9ded-a705ce91ccfd.png)
   > > > 
   > > > 
   > > > @wz2cool The sdk's built-in retry is necessary. System busy is a very common situation. If this situation needs to be specified by the user, then our sdk seems difficult to use. In addition, we can easily implement it, why require users to add code by themselves
   > > 
   > > 
   > > some rocketmq designers/members/contributors worried about overload, so sdk's build-in retry PR can't be merged long time ago. I think it's ok to use sdk's built in retry if there is no any risk to do this.
   > 
   > Actually,sdk will also retry when broker returns SYSTEM_ERROR. And when the pagecache is busy, the response code is SYSTEM_ERROR. In our internal, RocketMQ has been running for more than two years, and the entire cluster has not been overloaded because of a single Broker's busy, so this worry is unnecessary. Besides, the commercial version also supports retrying in this case, why can't the open-source version support it?
   
   In some cases, users don't run multi rocketmqs as cluster , they just run one rocketmq/nameserver (considering the cost) ,  I think commercial version  is also a cluster.
   I support to use build-in retrying if no risk in any case. Could someone make some tests to prove it. 
   Currently, I think config is a good choose.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] humkum commented on a diff in pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

Posted by GitBox <gi...@apache.org>.
humkum commented on code in PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#discussion_r1069264012


##########
client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java:
##########
@@ -72,7 +72,8 @@ public class DefaultMQProducer extends ClientConfig implements MQProducer {
         ResponseCode.SYSTEM_ERROR,
         ResponseCode.NO_PERMISSION,
         ResponseCode.NO_BUYER_ID,
-        ResponseCode.NOT_IN_CURRENT_UNIT
+        ResponseCode.NOT_IN_CURRENT_UNIT,
+        ResponseCode.SYSTEM_BUSY

Review Comment:
   > System busy means server is overload, why we need retry send message?
   
   To make sure message which send failed can retry to send to another brokers. One cluster might have many brokers, and it is not too possible that all brokers are `SYSTEM_BUSY` at the same time.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] cserwen commented on pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

Posted by GitBox <gi...@apache.org>.
cserwen commented on PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#issuecomment-1381706930

   > System busy means server is overload, why we need retry send message?
   
   @lizhimins refer to #5845 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] wz2cool commented on pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

Posted by GitBox <gi...@apache.org>.
wz2cool commented on PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#issuecomment-1386908522

   > > @cserwen
   > > we have lot of disussion about it, plz see #2726 , I think you can add SYSTEM_BUSY using addRetryResponseCode method by yourself . you can see my changes #2729
   > > ![image](https://user-images.githubusercontent.com/11556152/213111685-e664580c-f2a0-4cc8-9ded-a705ce91ccfd.png)
   > 
   > @wz2cool The sdk's built-in retry is necessary. System busy is a very common situation. If this situation needs to be specified by the user, then our sdk seems difficult to use. In addition, we can easily implement it, why require users to add code by themselves
   
   some rocketmq designers/contributors worried about overload, so sdk's build-in retry PR can't be merged long time ago. I think it's ok to use sdk's built in retry if there is not any risk to do this.  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] cserwen commented on pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

Posted by GitBox <gi...@apache.org>.
cserwen commented on PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#issuecomment-1386866181

   > @cserwen
   > we have lot of disussion about it, plz see #2726 , I think you can add SYSTEM_BUSY using addRetryResponseCode method by yourself . you can see my changes #2729
   > ![image](https://user-images.githubusercontent.com/11556152/213111685-e664580c-f2a0-4cc8-9ded-a705ce91ccfd.png)
   
   @wz2cool The sdk's built-in retry is necessary. System busy is a very common situation. If this situation needs to be specified by the user, then our sdk seems difficult to use. In addition, we can easily implement it, why require users to add code by themselves


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] wz2cool commented on pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

Posted by GitBox <gi...@apache.org>.
wz2cool commented on PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#issuecomment-1386614095

   we have lot of disussion about it,  plz see #2542 ,  I think you can add SYSTEM_BUSY by addRetryResponseCode by yourself  
   ![image](https://user-images.githubusercontent.com/11556152/213111685-e664580c-f2a0-4cc8-9ded-a705ce91ccfd.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY [rocketmq]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY
URL: https://github.com/apache/rocketmq/pull/5845


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] humkum commented on a diff in pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

Posted by GitBox <gi...@apache.org>.
humkum commented on code in PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#discussion_r1069264012


##########
client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java:
##########
@@ -72,7 +72,8 @@ public class DefaultMQProducer extends ClientConfig implements MQProducer {
         ResponseCode.SYSTEM_ERROR,
         ResponseCode.NO_PERMISSION,
         ResponseCode.NO_BUYER_ID,
-        ResponseCode.NOT_IN_CURRENT_UNIT
+        ResponseCode.NOT_IN_CURRENT_UNIT,
+        ResponseCode.SYSTEM_BUSY

Review Comment:
   > System busy means server is overload, why we need retry send message?
   
   To make sure message which send failed can retry to send to another brokers. One cluster might have serial brokers, and it is not too possible that all brokers are `SYSTEM_BUSY` at the same time.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] cserwen commented on a diff in pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

Posted by GitBox <gi...@apache.org>.
cserwen commented on code in PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#discussion_r1065385746


##########
client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java:
##########
@@ -72,7 +72,8 @@ public class DefaultMQProducer extends ClientConfig implements MQProducer {
         ResponseCode.SYSTEM_ERROR,
         ResponseCode.NO_PERMISSION,
         ResponseCode.NO_BUYER_ID,
-        ResponseCode.NOT_IN_CURRENT_UNIT
+        ResponseCode.NOT_IN_CURRENT_UNIT,
+        ResponseCode.SYSTEM_BUSY

Review Comment:
   We don't know the intent of the author who wrote it, so removing it is probably not a good option. Although I also think that client should not retry when broker returns `TOPIC_NOT_EXIST`:smile:. @ShadowySpirits 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] Oliverwqcwrw commented on a diff in pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

Posted by GitBox <gi...@apache.org>.
Oliverwqcwrw commented on code in PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#discussion_r1065410610


##########
client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java:
##########
@@ -72,7 +72,8 @@ public class DefaultMQProducer extends ClientConfig implements MQProducer {
         ResponseCode.SYSTEM_ERROR,
         ResponseCode.NO_PERMISSION,
         ResponseCode.NO_BUYER_ID,
-        ResponseCode.NOT_IN_CURRENT_UNIT
+        ResponseCode.NOT_IN_CURRENT_UNIT,
+        ResponseCode.SYSTEM_BUSY

Review Comment:
   @wz2cool  WDYT? :-)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] wz2cool commented on a diff in pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

Posted by GitBox <gi...@apache.org>.
wz2cool commented on code in PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#discussion_r1073220367


##########
client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java:
##########
@@ -72,7 +72,8 @@ public class DefaultMQProducer extends ClientConfig implements MQProducer {
         ResponseCode.SYSTEM_ERROR,
         ResponseCode.NO_PERMISSION,
         ResponseCode.NO_BUYER_ID,
-        ResponseCode.NOT_IN_CURRENT_UNIT
+        ResponseCode.NOT_IN_CURRENT_UNIT,
+        ResponseCode.SYSTEM_BUSY

Review Comment:
   we have  some disussion about it  plz see #2726



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] cserwen commented on pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

Posted by "cserwen (via GitHub)" <gi...@apache.org>.
cserwen commented on PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#issuecomment-1407910843

   > > > @cserwen
   > > > we have lot of disussion about it, plz see #2726 , I think you can add SYSTEM_BUSY using addRetryResponseCode method by yourself . you can see my changes #2729
   > > > ![image](https://user-images.githubusercontent.com/11556152/213111685-e664580c-f2a0-4cc8-9ded-a705ce91ccfd.png)
   > > 
   > > 
   > > @wz2cool The sdk's built-in retry is necessary. System busy is a very common situation. If this situation needs to be specified by the user, then our sdk seems difficult to use. In addition, we can easily implement it, why require users to add code by themselves
   > 
   > some rocketmq designers/members/contributors worried about overload, so sdk's build-in retry PR can't be merged long time ago. I think it's ok to use sdk's built in retry if there is no any risk to do this.
   
   Actually,sdk will also retry when broker returns SYSTEM_ERROR. And when the pagecache is busy, the response code is SYSTEM_ERROR. In our internal, RocketMQ has been running for more than two years, and the entire cluster has not been overloaded because of a single Broker's busy, so this worry is unnecessary. Besides, the commercial version also supports retrying in this case, why can't the open-source version support it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] lizhimins commented on pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

Posted by GitBox <gi...@apache.org>.
lizhimins commented on PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#issuecomment-1381491872

   System busy means server is overload, why we need retry send message?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] lizhimins commented on a diff in pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

Posted by GitBox <gi...@apache.org>.
lizhimins commented on code in PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#discussion_r1069098094


##########
client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java:
##########
@@ -72,7 +72,8 @@ public class DefaultMQProducer extends ClientConfig implements MQProducer {
         ResponseCode.SYSTEM_ERROR,
         ResponseCode.NO_PERMISSION,
         ResponseCode.NO_BUYER_ID,
-        ResponseCode.NOT_IN_CURRENT_UNIT
+        ResponseCode.NOT_IN_CURRENT_UNIT,
+        ResponseCode.SYSTEM_BUSY

Review Comment:
   System busy means server is overload, why we need retry send message?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] humkum commented on a diff in pull request #5845: [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY

Posted by GitBox <gi...@apache.org>.
humkum commented on code in PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#discussion_r1069264012


##########
client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java:
##########
@@ -72,7 +72,8 @@ public class DefaultMQProducer extends ClientConfig implements MQProducer {
         ResponseCode.SYSTEM_ERROR,
         ResponseCode.NO_PERMISSION,
         ResponseCode.NO_BUYER_ID,
-        ResponseCode.NOT_IN_CURRENT_UNIT
+        ResponseCode.NOT_IN_CURRENT_UNIT,
+        ResponseCode.SYSTEM_BUSY

Review Comment:
   > System busy means server is overload, why we need retry send message?
   
   To make sure message which send failed can retry to send success to another brokers. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #5838] retry to send when broker returns SYSTEM_BUSY [rocketmq]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #5845:
URL: https://github.com/apache/rocketmq/pull/5845#issuecomment-1924925075

   This PR was closed because it has been inactive for 3 days since being marked as stale.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org