You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "hein-hp (via GitHub)" <gi...@apache.org> on 2024/12/23 10:09:28 UTC
[PR] optimize: Caching the ConsistentHashSelector to avoid remapping when select every time. [incubator-seata]
hein-hp opened a new pull request, #7072:
URL: https://github.com/apache/incubator-seata/pull/7072
Caching the ConsistentHashSelector to avoid remapping when select every time.
<!-- Please make sure you have read and understood the contributing guidelines -->
- [ ] I have registered the PR [changes](../changes).
### Ⅰ. Describe what this PR did
Caching the ConsistentHashSelector to avoid remapping when select every time.
### Ⅱ. Does this pull request fix one issue?
<!-- If that, add "fixes #xxx" below in the next line, for example, fixes #97. -->
### Ⅲ. Why don't you add test cases (unit test/integration test)?
### Ⅳ. Describe how to verify it
### Ⅴ. Special notes for reviews
--
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@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: caching the ConsistentHashSelector to avoid remapping when select every time. [incubator-seata]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #7072:
URL: https://github.com/apache/incubator-seata/pull/7072#issuecomment-2705370394
## [Codecov](https://app.codecov.io/gh/apache/incubator-seata/pull/7072?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `83.33333%` with `4 lines` in your changes missing coverage. Please review.
> Project coverage is 51.57%. Comparing base [(`117e57a`)](https://app.codecov.io/gh/apache/incubator-seata/commit/117e57ac54180b8b5ba3cd5d858c00902047a6c3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`507573f`)](https://app.codecov.io/gh/apache/incubator-seata/commit/507573f576700d1cbad95267b1d0b24b1db0a870?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 1 commits behind head on 2.x.
| [Files with missing lines](https://app.codecov.io/gh/apache/incubator-seata/pull/7072?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...scovery/loadbalance/ConsistentHashLoadBalance.java](https://app.codecov.io/gh/apache/incubator-seata/pull/7072?src=pr&el=tree&filepath=discovery%2Fseata-discovery-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fdiscovery%2Floadbalance%2FConsistentHashLoadBalance.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZGlzY292ZXJ5L3NlYXRhLWRpc2NvdmVyeS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9kaXNjb3ZlcnkvbG9hZGJhbGFuY2UvQ29uc2lzdGVudEhhc2hMb2FkQmFsYW5jZS5qYXZh) | 83.33% | [1 Missing and 3 partials :warning: ](https://app.codecov.io/gh/apache/incubator-seata/pull/7072?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
[](https://app.codecov.io/gh/apache/incubator-seata/pull/7072?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## 2.x #7072 +/- ##
=========================================
Coverage 51.56% 51.57%
- Complexity 6812 6813 +1
=========================================
Files 1169 1169
Lines 41482 41505 +23
Branches 4851 4857 +6
=========================================
+ Hits 21389 21405 +16
- Misses 18072 18075 +3
- Partials 2021 2025 +4
```
| [Files with missing lines](https://app.codecov.io/gh/apache/incubator-seata/pull/7072?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...scovery/loadbalance/ConsistentHashLoadBalance.java](https://app.codecov.io/gh/apache/incubator-seata/pull/7072?src=pr&el=tree&filepath=discovery%2Fseata-discovery-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fdiscovery%2Floadbalance%2FConsistentHashLoadBalance.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZGlzY292ZXJ5L3NlYXRhLWRpc2NvdmVyeS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9kaXNjb3ZlcnkvbG9hZGJhbGFuY2UvQ29uc2lzdGVudEhhc2hMb2FkQmFsYW5jZS5qYXZh) | `84.31% <83.33%> (-1.41%)` | :arrow_down: |
... and [4 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-seata/pull/7072/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
<details><summary>🚀 New features to boost your workflow: </summary>
- ❄ [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- 📦 [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: caching the ConsistentHashSelector to avoid remapping when select every time. [incubator-seata]
Posted by "slievrly (via GitHub)" <gi...@apache.org>.
slievrly merged PR #7072:
URL: https://github.com/apache/incubator-seata/pull/7072
--
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@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] optimize: Caching the ConsistentHashSelector to avoid remapping when select every time. [incubator-seata]
Posted by "slievrly (via GitHub)" <gi...@apache.org>.
slievrly commented on code in PR #7072:
URL: https://github.com/apache/incubator-seata/pull/7072#discussion_r1901453937
##########
discovery/seata-discovery-core/src/main/java/org/apache/seata/discovery/loadbalance/ConsistentHashLoadBalance.java:
##########
@@ -19,9 +19,7 @@
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
-import java.util.List;
-import java.util.SortedMap;
-import java.util.TreeMap;
+import java.util.*;
Review Comment:
don't import *
--
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@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org