You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "mxsm (via GitHub)" <gi...@apache.org> on 2023/04/09 15:17:28 UTC

[GitHub] [rocketmq] mxsm opened a new pull request, #6559: [ISSUE #6558]Optimize ReplyMessageProcessor#parseRequestHeader logic and SendMessageRequestHeaderV2

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

   **Make sure set the target branch to `develop`**
   
   ## What is the purpose of the change
   
   <!--
   If this PR fixes a GitHub issue, please add `fixes #<XXX>` or `closes #<XXX>`. Please refer to the documentation for more information:
   https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
   -->
   
   fix #6558 
   
   ## Brief changelog
   
   - Optimize ReplyMessageProcessor#parseRequestHeader logic and SendMessageRequestHeaderV2
   
   ## 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] aaron-ai commented on pull request #6559: [ISSUE #6558]Optimize ReplyMessageProcessor#parseRequestHeader logic and SendMessageRequestHeaderV2

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

   @mxsm Please rebase the develop branch to pass the CI pipeline.


-- 
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 #6558]Optimize ReplyMessageProcessor#parseRequestHeader logic and SendMessageRequestHeaderV2 [rocketmq]

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

   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


[GitHub] [rocketmq] echooymxq commented on a diff in pull request #6559: [ISSUE #6558]Optimize ReplyMessageProcessor#parseRequestHeader logic and SendMessageRequestHeaderV2

Posted by "echooymxq (via GitHub)" <gi...@apache.org>.
echooymxq commented on code in PR #6559:
URL: https://github.com/apache/rocketmq/pull/6559#discussion_r1161305312


##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/SendMessageRequestHeaderV2.java:
##########
@@ -104,217 +104,217 @@ public void checkFields() throws RemotingCommandException {
 
     @Override
     public void encode(ByteBuf out) {
-        writeIfNotNull(out, "a", a);
-        writeIfNotNull(out, "b", b);
-        writeIfNotNull(out, "c", c);
-        writeIfNotNull(out, "d", d);
-        writeIfNotNull(out, "e", e);
-        writeIfNotNull(out, "f", f);
-        writeIfNotNull(out, "g", g);
-        writeIfNotNull(out, "h", h);
-        writeIfNotNull(out, "i", i);
-        writeIfNotNull(out, "j", j);
-        writeIfNotNull(out, "k", k);
-        writeIfNotNull(out, "l", l);
-        writeIfNotNull(out, "m", m);
-        writeIfNotNull(out, "n", n);
+        writeIfNotNull(out, "producerGroup", producerGroup);
+        writeIfNotNull(out, "topic", topic);
+        writeIfNotNull(out, "defaultTopic", defaultTopic);
+        writeIfNotNull(out, "defaultTopicQueueNums", defaultTopicQueueNums);
+        writeIfNotNull(out, "queueId", queueId);
+        writeIfNotNull(out, "sysFlag", sysFlag);
+        writeIfNotNull(out, "bornTimestamp", bornTimestamp);
+        writeIfNotNull(out, "flag", flag);
+        writeIfNotNull(out, "properties", properties);
+        writeIfNotNull(out, "reconsumeTimes", reconsumeTimes);
+        writeIfNotNull(out, "unitMode", unitMode);
+        writeIfNotNull(out, "consumeRetryTimes", consumeRetryTimes);
+        writeIfNotNull(out, "batch", batch);
+        writeIfNotNull(out, "brokerName", brokerName);
     }
 
     @Override
     public void decode(HashMap<String, String> fields) throws RemotingCommandException {
 
-        String str = getAndCheckNotNull(fields, "a");
+        String str = getAndCheckNotNull(fields, "producerGroup");
         if (str != null) {
-            a = str;
+            producerGroup = str;
         }
 
-        str = getAndCheckNotNull(fields, "b");
+        str = getAndCheckNotNull(fields, "topic");
         if (str != null) {
-            b = str;
+            topic = str;
         }
 
-        str = getAndCheckNotNull(fields, "c");
+        str = getAndCheckNotNull(fields, "defaultTopic");
         if (str != null) {
-            c = str;
+            defaultTopic = str;
         }
 
-        str = getAndCheckNotNull(fields, "d");
+        str = getAndCheckNotNull(fields, "defaultTopicQueueNums");
         if (str != null) {
-            d = Integer.parseInt(str);
+            defaultTopicQueueNums = Integer.parseInt(str);
         }
 
-        str = getAndCheckNotNull(fields, "e");
+        str = getAndCheckNotNull(fields, "queueId");
         if (str != null) {
-            e = Integer.parseInt(str);
+            queueId = Integer.parseInt(str);

Review Comment:
   It will cause compatibility problems for low client version.



-- 
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 #6558]Optimize ReplyMessageProcessor#parseRequestHeader logic and SendMessageRequestHeaderV2 [rocketmq]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #6559: [ISSUE #6558]Optimize ReplyMessageProcessor#parseRequestHeader logic and SendMessageRequestHeaderV2
URL: https://github.com/apache/rocketmq/pull/6559


-- 
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 #6558]Optimize ReplyMessageProcessor#parseRequestHeader logic and SendMessageRequestHeaderV2 [rocketmq]

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

   This PR is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in 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: commits-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 #6559: [ISSUE #6558]Optimize ReplyMessageProcessor#parseRequestHeader logic and SendMessageRequestHeaderV2

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

   ## [Codecov](https://codecov.io/gh/apache/rocketmq/pull/6559?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 [#6559](https://codecov.io/gh/apache/rocketmq/pull/6559?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (15b4485) into [develop](https://codecov.io/gh/apache/rocketmq/commit/9574165fe38c51f789eebbba485291bee505ab2b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9574165) will **decrease** coverage by `0.09%`.
   > The diff coverage is `27.35%`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #6559      +/-   ##
   =============================================
   - Coverage      43.16%   43.07%   -0.09%     
   + Complexity      9014     8993      -21     
   =============================================
     Files           1107     1107              
     Lines          78255    78253       -2     
     Branches       10201    10200       -1     
   =============================================
   - Hits           33777    33708      -69     
   - Misses         40241    40320      +79     
   + Partials        4237     4225      -12     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/6559?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ng/protocol/header/SendMessageRequestHeaderV2.java](https://codecov.io/gh/apache/rocketmq/pull/6559?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cmVtb3Rpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3JlbW90aW5nL3Byb3RvY29sL2hlYWRlci9TZW5kTWVzc2FnZVJlcXVlc3RIZWFkZXJWMi5qYXZh) | `21.08% <25.45%> (ø)` | |
   | [...cketmq/broker/processor/ReplyMessageProcessor.java](https://codecov.io/gh/apache/rocketmq/pull/6559?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL1JlcGx5TWVzc2FnZVByb2Nlc3Nvci5qYXZh) | `57.06% <57.14%> (+0.07%)` | :arrow_up: |
   
   ... and [41 files with indirect coverage changes](https://codecov.io/gh/apache/rocketmq/pull/6559/indirect-changes?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: commits-unsubscribe@rocketmq.apache.org

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