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/08/02 13:40:40 UTC

[GitHub] [rocketmq] mxsm opened a new pull request, #4768: [ISSUE #4745]Check controllerDLegerPeers and controllerDLegerSelfId attributes before create DLedgerServer

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

   **Make sure set the target branch to `develop`**
   
   ## What is the purpose of the change
   
   close #4745 
   
   ## Brief changelog
   
   - Check controllerDLegerPeers and controllerDLegerSelfId attributes before create DLedgerServer
   
   ## 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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] coveralls commented on pull request #4768: [ISSUE #4745]Check controllerDLegerPeers and controllerDLegerSelfId attributes before create DLedgerServer

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

   
   [![Coverage Status](https://coveralls.io/builds/51402828/badge)](https://coveralls.io/builds/51402828)
   
   Coverage decreased (-0.06%) to 49.112% when pulling **a94c2e5bf857a83d872ac9c2a87ba9064c8ceaf4 on mxsm:rocketmq-4745** into **c6b3a66ecf5e6bdeffb01093e5216bb10ee64a59 on apache:develop**.
   


-- 
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 #4768: [ISSUE #4745]Check controllerDLegerPeers and controllerDLegerSelfId attributes before create DLedgerServer

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

   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/4768?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 [#4768](https://codecov.io/gh/apache/rocketmq/pull/4768?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a94c2e5) into [develop](https://codecov.io/gh/apache/rocketmq/commit/c6b3a66ecf5e6bdeffb01093e5216bb10ee64a59?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c6b3a66) will **decrease** coverage by `0.23%`.
   > The diff coverage is `0.00%`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #4768      +/-   ##
   =============================================
   - Coverage      45.06%   44.82%   -0.24%     
   + Complexity      7617     7587      -30     
   =============================================
     Files            977      977              
     Lines          67778    67782       +4     
     Branches        8959     8961       +2     
   =============================================
   - Hits           30542    30383     -159     
   - Misses         33470    33626     +156     
   - Partials        3766     3773       +7     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/4768?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../apache/rocketmq/controller/ControllerManager.java](https://codecov.io/gh/apache/rocketmq/pull/4768/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-Y29udHJvbGxlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvY29udHJvbGxlci9Db250cm9sbGVyTWFuYWdlci5qYXZh) | `74.44% <0.00%> (-3.47%)` | :arrow_down: |
   | [.../broker/subscription/SubscriptionGroupManager.java](https://codecov.io/gh/apache/rocketmq/pull/4768/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-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvc3Vic2NyaXB0aW9uL1N1YnNjcmlwdGlvbkdyb3VwTWFuYWdlci5qYXZh) | `68.79% <0.00%> (-14.19%)` | :arrow_down: |
   | [...n/java/org/apache/rocketmq/test/util/StatUtil.java](https://codecov.io/gh/apache/rocketmq/pull/4768/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-dGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvdGVzdC91dGlsL1N0YXRVdGlsLmphdmE=) | `16.19% <0.00%> (-14.09%)` | :arrow_down: |
   | [...va/org/apache/rocketmq/logging/inner/Appender.java](https://codecov.io/gh/apache/rocketmq/pull/4768/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-bG9nZ2luZy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbG9nZ2luZy9pbm5lci9BcHBlbmRlci5qYXZh) | `29.21% <0.00%> (-7.87%)` | :arrow_down: |
   | [...org/apache/rocketmq/common/stats/StatsItemSet.java](https://codecov.io/gh/apache/rocketmq/pull/4768/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-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvU3RhdHNJdGVtU2V0LmphdmE=) | `41.79% <0.00%> (-4.48%)` | :arrow_down: |
   | [...ketmq/common/protocol/body/ConsumerConnection.java](https://codecov.io/gh/apache/rocketmq/pull/4768/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-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vcHJvdG9jb2wvYm9keS9Db25zdW1lckNvbm5lY3Rpb24uamF2YQ==) | `95.83% <0.00%> (-4.17%)` | :arrow_down: |
   | [...ache/rocketmq/broker/topic/TopicConfigManager.java](https://codecov.io/gh/apache/rocketmq/pull/4768/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-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvdG9waWMvVG9waWNDb25maWdNYW5hZ2VyLmphdmE=) | `59.03% <0.00%> (-3.06%)` | :arrow_down: |
   | [...tmq/broker/longpolling/PullRequestHoldService.java](https://codecov.io/gh/apache/rocketmq/pull/4768/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-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvbG9uZ3BvbGxpbmcvUHVsbFJlcXVlc3RIb2xkU2VydmljZS5qYXZh) | `63.36% <0.00%> (-2.98%)` | :arrow_down: |
   | [...he/rocketmq/controller/impl/DLedgerController.java](https://codecov.io/gh/apache/rocketmq/pull/4768/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-Y29udHJvbGxlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvY29udHJvbGxlci9pbXBsL0RMZWRnZXJDb250cm9sbGVyLmphdmE=) | `70.32% <0.00%> (-2.75%)` | :arrow_down: |
   | [...a/org/apache/rocketmq/broker/BrokerController.java](https://codecov.io/gh/apache/rocketmq/pull/4768/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-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvQnJva2VyQ29udHJvbGxlci5qYXZh) | `43.90% <0.00%> (-2.66%)` | :arrow_down: |
   | ... and [18 more](https://codecov.io/gh/apache/rocketmq/pull/4768/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: Codecov can now indicate which changes are the most critical in Pull Requests. [Learn more](https://about.codecov.io/product/feature/runtime-insights/?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] RongtongJin merged pull request #4768: [ISSUE #4745]Check controllerDLegerPeers and controllerDLegerSelfId attributes before create DLedgerServer

Posted by GitBox <gi...@apache.org>.
RongtongJin merged PR #4768:
URL: https://github.com/apache/rocketmq/pull/4768


-- 
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] coveralls commented on pull request #4768: [ISSUE #4745]Check controllerDLegerPeers and controllerDLegerSelfId attributes before create DLedgerServer

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

   
   [![Coverage Status](https://coveralls.io/builds/51402828/badge)](https://coveralls.io/builds/51402828)
   
   Coverage decreased (-0.06%) to 49.112% when pulling **a94c2e5bf857a83d872ac9c2a87ba9064c8ceaf4 on mxsm:rocketmq-4745** into **c6b3a66ecf5e6bdeffb01093e5216bb10ee64a59 on apache:develop**.
   


-- 
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] mxsm commented on pull request #4768: [ISSUE #4745]Check controllerDLegerPeers and controllerDLegerSelfId attributes before create DLedgerServer

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

   > [ERROR] /home/travis/build/apache/rocketmq/controller/src/main/java/org/apache/rocketmq/controller/ControllerManager.java:97:9: 'if' is not followed by whitespace. [WhitespaceAround] [ERROR] /home/travis/build/apache/rocketmq/controller/src/main/java/org/apache/rocketmq/controller/ControllerManager.java:97:83: '{' is not preceded with whitespace. [WhitespaceAround]
   > 
   > Some check style failed
   
   I resubmitted the code


-- 
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] mxsm commented on a diff in pull request #4768: [ISSUE #4745]Check controllerDLegerPeers and controllerDLegerSelfId attributes before create DLedgerServer

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


##########
controller/src/main/java/org/apache/rocketmq/controller/ControllerManager.java:
##########
@@ -91,6 +91,12 @@ protected <T> RunnableFuture<T> newTaskFor(final Runnable runnable, final T valu
             }
         };
         this.heartbeatManager = new DefaultBrokerHeartbeatManager(this.controllerConfig);
+        if (StringUtils.isEmpty(this.controllerConfig.getControllerDLegerPeers())) {
+            throw new IllegalArgumentException("Attribute value controllerDLegerPeers of ControllerConfig is null");
+        }
+        if(StringUtils.isEmpty(this.controllerConfig.getControllerDLegerSelfId())){
+            throw new IllegalArgumentException("Attribute value controllerDLegerSelfId of ControllerConfig is null");

Review Comment:
   > 'is null or empty' may be more accurate.
   
   OK I will modify 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] caigy commented on a diff in pull request #4768: [ISSUE #4745]Check controllerDLegerPeers and controllerDLegerSelfId attributes before create DLedgerServer

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


##########
controller/src/main/java/org/apache/rocketmq/controller/ControllerManager.java:
##########
@@ -91,6 +91,12 @@ protected <T> RunnableFuture<T> newTaskFor(final Runnable runnable, final T valu
             }
         };
         this.heartbeatManager = new DefaultBrokerHeartbeatManager(this.controllerConfig);
+        if (StringUtils.isEmpty(this.controllerConfig.getControllerDLegerPeers())) {
+            throw new IllegalArgumentException("Attribute value controllerDLegerPeers of ControllerConfig is null");
+        }
+        if(StringUtils.isEmpty(this.controllerConfig.getControllerDLegerSelfId())){
+            throw new IllegalArgumentException("Attribute value controllerDLegerSelfId of ControllerConfig is null");

Review Comment:
   'is null or empty' may be more accurate.



-- 
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