You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "finefuture (via GitHub)" <gi...@apache.org> on 2023/10/20 03:44:16 UTC

[PR] Set a threshold for instance event changes [dubbo]

finefuture opened a new pull request, #13240:
URL: https://github.com/apache/dubbo/pull/13240

   ## What is the purpose of the change
   Threshold=number of valid nodes after change/number of original valid nodes.
   
   Assuming a threshold of 0.3:
   1. The original 100 valid nodes received an event: 80 valid nodes offline, 20/100 less than the threshold of 0.3, discarding this change
   2. The original 100 valid nodes have received an event: 50 valid nodes offline, with 50/100 exceeding the threshold of 0.3. Process this change
   3. There are 100 original nodes, including 50 valid nodes and 50 unavailable nodes. Received event: 80 offline nodes (40 valid nodes+40 unavailable nodes), with 10/50 less than the threshold of 0.3. Discard this change
   4. There are 100 original nodes, including 50 valid nodes and 50 unavailable nodes. Received event: 80 offline nodes (30 valid nodes+50 unavailable nodes), 20/50 is greater than the threshold of 0.3. Process this change
   5. There are 100 original nodes, including 50 valid nodes and 50 unavailable nodes. Received event: 50 offline nodes (50 valid nodes), 0/50 is less than the threshold of 0.3, discard this change
   6. There are 100 original nodes, including 50 valid nodes and 50 unavailable nodes. Received event: 50 offline nodes (10 valid nodes+40 unavailable nodes), with 40/50 exceeding the threshold of 0.3. Process this change
   
   Scenario:
   1. Provider publishing or scaling requires mass publishing, and the threshold will be lower than the normal threshold
   
   > - It is necessary to have all upstream users change the threshold for this appkey
   
   2. Due to the special nature of the business, the consumer service needs to adjust the threshold, such as the core service wanting to adjust the threshold higher to ensure the success rate of the call
   
   > - It is necessary to change the default threshold for all appkeys in this service
   
   Priority: provider>consumer>default
   
   
   ## Brief changelog
   After the registration center recovers from a failure, all temporary nodes will be re registered, and a smaller number of nodes will be pushed to the consumer (such as events for one node or two nodes). If the consumer refreshes the list, it will result in only a few nodes receiving traffic, and in high traffic situations, a large number of reject exceptions will occur, causing traffic loss
   
   ## Verifying this change
   
   
   <!-- Follow this checklist to help us incorporate your contribution quickly and easily: -->
   
   ## Checklist
   - [x] Make sure there is a [GitHub_issue](https://github.com/apache/dubbo/issues) field 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.
   - [ ] Each commit in the pull request should have a meaningful subject line and body.
   - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [ ] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
   - [ ] Write necessary unit-test 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 sample in [dubbo samples](https://github.com/apache/dubbo-samples) project.
   - [ ] Add some description to [dubbo-website](https://github.com/apache/dubbo-website) project if you are requesting to add a feature.
   - [ ] GitHub Actions works fine on your own branch.
   - [ ] If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/dubbo/wiki/Software-donation-guide).
   


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] Set a threshold for instance event changes [dubbo]

Posted by "finefuture (via GitHub)" <gi...@apache.org>.
finefuture commented on PR #13240:
URL: https://github.com/apache/dubbo/pull/13240#issuecomment-1788844372

   Perhaps providing an extension would be better, I will 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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] Set a threshold for instance event changes [dubbo]

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

   ## [Codecov](https://app.codecov.io/gh/apache/dubbo/pull/13240?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#13240](https://app.codecov.io/gh/apache/dubbo/pull/13240?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (1d1f9c8) into [3.2](https://app.codecov.io/gh/apache/dubbo/commit/416374cd78f87fc20d293e4f2af6e6ef452b198d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (416374c) will **decrease** coverage by `0.04%`.
   > Report is 3 commits behind head on 3.2.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 1d1f9c8 differs from pull request most recent head b72f6d2. Consider uploading reports for the commit b72f6d2 to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##                3.2   #13240      +/-   ##
   ============================================
   - Coverage     69.47%   69.44%   -0.04%     
     Complexity        2        2              
   ============================================
     Files          1651     1653       +2     
     Lines         68736    68967     +231     
     Branches      10012    10048      +36     
   ============================================
   + Hits          47753    47891     +138     
   - Misses        16385    16444      +59     
   - Partials       4598     4632      +34     
   ```
   
   
   [see 45 files with indirect coverage changes](https://app.codecov.io/gh/apache/dubbo/pull/13240/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :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=apache)
   


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] Set a threshold for instance event changes [dubbo]

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13240:
URL: https://github.com/apache/dubbo/pull/13240#issuecomment-1772071249

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo&pullRequest=13240)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=13240&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=13240&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=13240&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=CODE_SMELL)
   
   [![3.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '3.0%')](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=13240&metric=new_coverage&view=list) [3.0% Coverage](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=13240&metric=new_coverage&view=list)  
   [![13.9%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/20-16px.png '13.9%')](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=13240&metric=new_duplicated_lines_density&view=list) [13.9% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=13240&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] Set a threshold for instance event changes [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on PR #13240:
URL: https://github.com/apache/dubbo/pull/13240#issuecomment-1772259130

   `org.apache.dubbo.registry.AddressListener#notify` may be useful for you. You can customize the url in the AddressListener, or the event returns the previous result.
   For this PR, I think it is dangerous to merge. This may cause notifications to be lost in some cases.


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] Set a threshold for instance event changes [dubbo]

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13240:
URL: https://github.com/apache/dubbo/pull/13240#issuecomment-1772069408

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo&pullRequest=13240)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=13240&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=13240&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo&pullRequest=13240&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo&pullRequest=13240&resolved=false&types=CODE_SMELL)
   
   [![3.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '3.0%')](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=13240&metric=new_coverage&view=list) [3.0% Coverage](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=13240&metric=new_coverage&view=list)  
   [![13.9%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/20-16px.png '13.9%')](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=13240&metric=new_duplicated_lines_density&view=list) [13.9% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo&pullRequest=13240&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] Set a threshold for instance event changes [dubbo]

Posted by "finefuture (via GitHub)" <gi...@apache.org>.
finefuture commented on PR #13240:
URL: https://github.com/apache/dubbo/pull/13240#issuecomment-1772321836

   > `org.apache.dubbo.registry.AddressListener#notify` may be useful for you. You can customize the url in the AddressListener, or the event returns the previous result. For this PR, I think it is dangerous to merge. This may cause notifications to be lost in some cases.
   
   The AddressListener is OK, which is designed to improve the high availability of rpc, similar to the enableEmptyProtection parameter.
   It can be temporarily held, don't merge yet, see if anyone else has the same problem in the future.


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] Set a threshold for instance event changes [dubbo]

Posted by "finefuture (via GitHub)" <gi...@apache.org>.
finefuture closed pull request #13240: Set a threshold for instance event changes
URL: https://github.com/apache/dubbo/pull/13240


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org