You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/09/23 03:16:03 UTC

[GitHub] [rocketmq] alexcao2018 opened a new pull request, #5172: [ISSUE #5138] Do not throw exception in order producer demo

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

   **Make sure set the target branch to `develop`**
   
   ## What is the purpose of the change
   
   Fixed bug https://github.com/apache/rocketmq/issues/5138 . For previous PR conflicts, I make a new PR.
   
   ## Brief changelog
   
   Fixed bug https://github.com/apache/rocketmq/issues/5138 .
   
   ## Verifying this change
   
   Fixed bug https://github.com/apache/rocketmq/issues/5138 .
   
   
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] codecov-commenter commented on pull request #5172: [ISSUE #5138] Do not throw exception in order producer demo

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #5172:
URL: https://github.com/apache/rocketmq/pull/5172#issuecomment-1255849253

   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/5172?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#5172](https://codecov.io/gh/apache/rocketmq/pull/5172?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (745f3b7) into [develop](https://codecov.io/gh/apache/rocketmq/commit/7e6bee2c48234d3785e31826a5589e3910738d4d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7e6bee2) will **increase** coverage by `0.05%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #5172      +/-   ##
   =============================================
   + Coverage      43.26%   43.32%   +0.05%     
   - Complexity      7801     7812      +11     
   =============================================
     Files            997      997              
     Lines          69343    69343              
     Branches        9166     9166              
   =============================================
   + Hits           30004    30042      +38     
   + Misses         35567    35536      -31     
   + Partials        3772     3765       -7     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/5172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...q/namesrv/routeinfo/BrokerHousekeepingService.java](https://codecov.io/gh/apache/rocketmq/pull/5172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bmFtZXNydi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbmFtZXNydi9yb3V0ZWluZm8vQnJva2VySG91c2VrZWVwaW5nU2VydmljZS5qYXZh) | `72.72% <0.00%> (-9.10%)` | :arrow_down: |
   | [...a/org/apache/rocketmq/filter/util/BloomFilter.java](https://codecov.io/gh/apache/rocketmq/pull/5172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmlsdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9maWx0ZXIvdXRpbC9CbG9vbUZpbHRlci5qYXZh) | `60.43% <0.00%> (-2.20%)` | :arrow_down: |
   | [...he/rocketmq/client/trace/AsyncTraceDispatcher.java](https://codecov.io/gh/apache/rocketmq/pull/5172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvdHJhY2UvQXN5bmNUcmFjZURpc3BhdGNoZXIuamF2YQ==) | `81.42% <0.00%> (-1.43%)` | :arrow_down: |
   | [...tmq/namesrv/processor/DefaultRequestProcessor.java](https://codecov.io/gh/apache/rocketmq/pull/5172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bmFtZXNydi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbmFtZXNydi9wcm9jZXNzb3IvRGVmYXVsdFJlcXVlc3RQcm9jZXNzb3IuamF2YQ==) | `58.88% <0.00%> (-1.12%)` | :arrow_down: |
   | [...rocketmq/broker/processor/PopMessageProcessor.java](https://codecov.io/gh/apache/rocketmq/pull/5172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL1BvcE1lc3NhZ2VQcm9jZXNzb3IuamF2YQ==) | `37.63% <0.00%> (-0.54%)` | :arrow_down: |
   | [...e/rocketmq/namesrv/routeinfo/RouteInfoManager.java](https://codecov.io/gh/apache/rocketmq/pull/5172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bmFtZXNydi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbmFtZXNydi9yb3V0ZWluZm8vUm91dGVJbmZvTWFuYWdlci5qYXZh) | `63.53% <0.00%> (-0.49%)` | :arrow_down: |
   | [...cketmq/broker/processor/PopBufferMergeService.java](https://codecov.io/gh/apache/rocketmq/pull/5172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL1BvcEJ1ZmZlck1lcmdlU2VydmljZS5qYXZh) | `37.44% <0.00%> (-0.24%)` | :arrow_down: |
   | [...ava/org/apache/rocketmq/filter/util/BitsArray.java](https://codecov.io/gh/apache/rocketmq/pull/5172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmlsdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9maWx0ZXIvdXRpbC9CaXRzQXJyYXkuamF2YQ==) | `59.82% <0.00%> (ø)` | |
   | [.../org/apache/rocketmq/proxy/config/ProxyConfig.java](https://codecov.io/gh/apache/rocketmq/pull/5172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2NvbmZpZy9Qcm94eUNvbmZpZy5qYXZh) | `49.74% <0.00%> (ø)` | |
   | [...etmq/namesrv/processor/ClientRequestProcessor.java](https://codecov.io/gh/apache/rocketmq/pull/5172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bmFtZXNydi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbmFtZXNydi9wcm9jZXNzb3IvQ2xpZW50UmVxdWVzdFByb2Nlc3Nvci5qYXZh) | `70.37% <0.00%> (ø)` | |
   | ... and [15 more](https://codecov.io/gh/apache/rocketmq/pull/5172/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] lizhanhui commented on pull request #5172: [ISSUE #5138] Do not throw exception in order producer demo

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

   It would make sense to catch all exceptions raised and translate them into human-friendly messages via standard error output. 


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] alexcao2018 commented on pull request #5172: [ISSUE #5138] Do not throw exception in order producer demo

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

   > Silent Data Corruption
   
   I committed new code improvement for the issue mentioned before in a new branch issue_5138_alt2, and I also submitted a PR on 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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] alexcao2018 commented on pull request #5172: [ISSUE #5138] Do not throw exception in order producer demo

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

   I already found this issue: getBytes(StandardCharsets.UTF_8); in a large number of code of example package. How to do them is my question.


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] alexcao2018 commented on pull request #5172: [ISSUE #5138] Do not throw exception in order producer demo

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

   > Why UnsupportedEncodingException is not OK while MQClientException is?
   
   Because previous version using the method of String getBytes(String) that throws UnsupportedEncodingException, I change to use getBytes(Charset) , overload, making code nice, It is none of business to MQClientException.


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] lizhanhui commented on pull request #5172: [ISSUE #5138] Do not throw exception in order producer demo

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

   > Please close this PR.
   
   You do not have to create new pull requests... It would be fine to fix conflicts through rebasing and pushing to your forked branch


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] alexcao2018 commented on pull request #5172: [ISSUE #5138] Do not throw exception in order producer demo

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

   linked from https://github.com/apache/rocketmq/pull/5150


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] alexcao2018 commented on pull request #5172: [ISSUE #5138] Do not throw exception in order producer demo

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

   Please close this PR.


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] ShannonDing closed pull request #5172: [ISSUE #5138] Do not throw exception in order producer demo

Posted by GitBox <gi...@apache.org>.
ShannonDing closed pull request #5172: [ISSUE #5138] Do not throw exception in order producer demo
URL: https://github.com/apache/rocketmq/pull/5172


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] lizhanhui commented on pull request #5172: [ISSUE #5138] Do not throw exception in order producer demo

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

   > How to do them is my question.
   
   It would be a good pull request to fix them.


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] lizhanhui commented on pull request #5172: [ISSUE #5138] Do not throw exception in order producer demo

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

   @alexcao2018 
   > Because previous version using the method of String getBytes(String) that throws UnsupportedEncodingException, I change to use getBytes(Charset) , overload, making code nice
   
   No, you are not making the code nice, you are creating chances of introducing Silent Data Corruption. See the [Java doc here](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html#getBytes(java.nio.charset.Charset))
   
   **This method always replaces malformed-input and unmappable-character sequences with this charset's default replacement byte array.**
   
   This is not expected, should use CharsetEncoder to enhance the solution, as is elaborated in the Javadoc.
   
   In terms of method signature on exception, 
   
   > "It would make sense to catch all exceptions raised and translate them into human-friendly messages via standard error output." 
   
   still holds.


-- 
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: dev-unsubscribe@rocketmq.apache.org

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