-
Notifications
You must be signed in to change notification settings - Fork 12k
[ISSUE #6290]Optimize LatencyFaultToleranceImpl#updateFaultItem method #6291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| old.setStartTimestamp(System.currentTimeMillis() + notAvailableDuration); | ||
| } | ||
| } else { | ||
| FaultItem old = this.faultItemTable.putIfAbsent(name, new FaultItem(name, currentLatency, System.currentTimeMillis() + notAvailableDuration)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe computeIfAbsent is more suitable for reducing extra object creation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drpmma thanks for you suggestion. I will fix it and resubmit later
Codecov Report
@@ Coverage Diff @@
## develop #6291 +/- ##
=============================================
+ Coverage 43.12% 43.15% +0.02%
- Complexity 8847 8856 +9
=============================================
Files 1095 1094 -1
Lines 77279 77247 -32
Branches 10082 10081 -1
=============================================
+ Hits 33324 33333 +9
+ Misses 39782 39745 -37
+ Partials 4173 4169 -4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
drpmma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
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 PR was closed because it has been inactive for 3 days since being marked as stale. |
Make sure set the target branch to
developWhat is the purpose of the change
fix #6290
Brief changelog
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.[ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyleto make sure basic checks pass. Runmvn clean install -DskipITsto make sure unit-test pass. Runmvn clean test-compile failsafe:integration-testto make sure integration-test pass.