You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "iwangjie (via GitHub)" <gi...@apache.org> on 2023/02/08 08:25:54 UTC

[GitHub] [shenyu] iwangjie opened a new pull request, #4366: fix issue_4536 review commit

iwangjie opened a new pull request, #4366:
URL: https://github.com/apache/shenyu/pull/4366

   <!-- Describe your PR here; eg. Fixes #issueNo -->
   #4356 task code. Still in process.
   
   <!--
   Thank you for proposing a pull request. This template will guide you through the essential steps necessary for a pull request.
   -->
   Make sure that:
   
   - [X] You have read the [contribution guidelines](https://shenyu.apache.org/community/contributor-guide).
   - [X] You submit test cases (unit or integration tests) that back your changes.
   - [X] Your local test passed `./mvnw clean install -Dmaven.javadoc.skip=true`.
   


-- 
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: notifications-unsubscribe@shenyu.apache.org

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


[GitHub] [shenyu] dragon-zhang commented on a diff in pull request #4366: [ISSUE #4356] optimize UpstreamCheckService

Posted by "dragon-zhang (via GitHub)" <gi...@apache.org>.
dragon-zhang commented on code in PR #4366:
URL: https://github.com/apache/shenyu/pull/4366#discussion_r1102273081


##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/UpstreamCheckService.java:
##########
@@ -243,56 +258,91 @@ public void replace(final String selectorId, final List<CommonUpstream> commonUp
 
     private void scheduled() {
         try {
-            if (!ZOMBIE_SET.isEmpty()) {
-                ZOMBIE_SET.parallelStream().forEach(this::checkZombie);
-            }
-            if (!UPSTREAM_MAP.isEmpty()) {
-                UPSTREAM_MAP.forEach(this::check);
-            }
+            doCheck();
+            waitFinish();
         } catch (Exception e) {
             LOG.error("upstream scheduled check error -------- ", e);
         }
     }
 
+    private void doCheck() {
+        // check zombie
+        ZOMBIE_SET.parallelStream().forEach(this::checkZombie);
+        // check up
+        UPSTREAM_MAP.forEach(this::check);

Review Comment:
   Reserve the judgment and remove `parallelStream`.



-- 
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: notifications-unsubscribe@shenyu.apache.org

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


[GitHub] [shenyu] codecov-commenter commented on pull request #4366: [ISSUE #4356] optimize UpstreamCheckService

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

   # [Codecov](https://codecov.io/gh/apache/shenyu/pull/4366?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 [#4366](https://codecov.io/gh/apache/shenyu/pull/4366?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c12fab2) into [master](https://codecov.io/gh/apache/shenyu/commit/34b61dcf46eda4c0412c2f740663077f07c870e5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (34b61dc) will **decrease** coverage by `0.05%`.
   > The diff coverage is `72.36%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #4366      +/-   ##
   ============================================
   - Coverage     68.31%   68.26%   -0.05%     
   - Complexity     7502     7512      +10     
   ============================================
     Files          1020     1021       +1     
     Lines         28799    28828      +29     
     Branches       2569     2562       -7     
   ============================================
   + Hits          19673    19680       +7     
   - Misses         7590     7610      +20     
   - Partials       1536     1538       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shenyu/pull/4366?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...a/org/apache/shenyu/common/constant/Constants.java](https://codecov.io/gh/apache/shenyu/pull/4366?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hlbnl1LWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hlbnl1L2NvbW1vbi9jb25zdGFudC9Db25zdGFudHMuamF2YQ==) | `66.66% <ø> (ø)` | |
   | [...yu/common/dto/convert/selector/ZombieUpstream.java](https://codecov.io/gh/apache/shenyu/pull/4366?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hlbnl1LWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hlbnl1L2NvbW1vbi9kdG8vY29udmVydC9zZWxlY3Rvci9ab21iaWVVcHN0cmVhbS5qYXZh) | `82.05% <ø> (-0.88%)` | :arrow_down: |
   | [...nyu/admin/service/pojo/UpstreamWithSelectorId.java](https://codecov.io/gh/apache/shenyu/pull/4366?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hlbnl1LWFkbWluL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGVueXUvYWRtaW4vc2VydmljZS9wb2pvL1Vwc3RyZWFtV2l0aFNlbGVjdG9ySWQuamF2YQ==) | `44.44% <44.44%> (ø)` | |
   | [...e/shenyu/loadbalancer/cache/UpstreamCheckTask.java](https://codecov.io/gh/apache/shenyu/pull/4366?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hlbnl1LWxvYWRiYWxhbmNlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hlbnl1L2xvYWRiYWxhbmNlci9jYWNoZS9VcHN0cmVhbUNoZWNrVGFzay5qYXZh) | `92.96% <75.00%> (-0.64%)` | :arrow_down: |
   | [...henyu/admin/service/impl/UpstreamCheckService.java](https://codecov.io/gh/apache/shenyu/pull/4366?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hlbnl1LWFkbWluL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGVueXUvYWRtaW4vc2VydmljZS9pbXBsL1Vwc3RyZWFtQ2hlY2tTZXJ2aWNlLmphdmE=) | `67.05% <79.16%> (+4.64%)` | :arrow_up: |
   | [.../org/apache/shenyu/common/config/ShenyuConfig.java](https://codecov.io/gh/apache/shenyu/pull/4366?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hlbnl1LWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hlbnl1L2NvbW1vbi9jb25maWcvU2hlbnl1Q29uZmlnLmphdmE=) | `70.85% <100.00%> (+0.36%)` | :arrow_up: |
   | [...henyu/loadbalancer/cache/UpstreamCacheManager.java](https://codecov.io/gh/apache/shenyu/pull/4366?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hlbnl1LWxvYWRiYWxhbmNlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hlbnl1L2xvYWRiYWxhbmNlci9jYWNoZS9VcHN0cmVhbUNhY2hlTWFuYWdlci5qYXZh) | `95.83% <100.00%> (+0.18%)` | :arrow_up: |
   | [...plugin/cryptor/response/CryptorResponsePlugin.java](https://codecov.io/gh/apache/shenyu/pull/4366?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hlbnl1LXBsdWdpbi9zaGVueXUtcGx1Z2luLWNyeXB0b3Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoZW55dS9wbHVnaW4vY3J5cHRvci9yZXNwb25zZS9DcnlwdG9yUmVzcG9uc2VQbHVnaW4uamF2YQ==) | `36.36% <0.00%> (-16.97%)` | :arrow_down: |
   | [...he/shenyu/loadbalancer/spi/RandomLoadBalancer.java](https://codecov.io/gh/apache/shenyu/pull/4366?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hlbnl1LWxvYWRiYWxhbmNlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hlbnl1L2xvYWRiYWxhbmNlci9zcGkvUmFuZG9tTG9hZEJhbGFuY2VyLmphdmE=) | `81.81% <0.00%> (-9.10%)` | :arrow_down: |
   | [...a/org/apache/shenyu/common/utils/VersionUtils.java](https://codecov.io/gh/apache/shenyu/pull/4366?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hlbnl1LWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hlbnl1L2NvbW1vbi91dGlscy9WZXJzaW9uVXRpbHMuamF2YQ==) | `21.27% <0.00%> (-6.39%)` | :arrow_down: |
   | ... and [22 more](https://codecov.io/gh/apache/shenyu/pull/4366?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: notifications-unsubscribe@shenyu.apache.org

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


[GitHub] [shenyu] dragon-zhang merged pull request #4366: [ISSUE #4356] optimize UpstreamCheckService

Posted by "dragon-zhang (via GitHub)" <gi...@apache.org>.
dragon-zhang merged PR #4366:
URL: https://github.com/apache/shenyu/pull/4366


-- 
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: notifications-unsubscribe@shenyu.apache.org

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