Skip to content
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

Add cache mechanism for LoadRules in circuitbreaker module #324

Merged
merged 2 commits into from
Nov 16, 2020

Conversation

binbin0325
Copy link
Collaborator

Describe what this PR does / why we need it
In order to avoid the meaningless updates to the property, downstream of property manager should
cache last update value to check consistency.

Does this pull request fix one issue?
Fix:#111

Describe how you did it
Using reflect.deepequal,maybe we need to think about performance

Describe how to verify it
ut

Special notes for reviews

@codecov-io
Copy link

codecov-io commented Nov 12, 2020

Codecov Report

Merging #324 (162dc70) into master (14fe759) will increase coverage by 0.24%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #324      +/-   ##
==========================================
+ Coverage   50.41%   50.66%   +0.24%     
==========================================
  Files          68       68              
  Lines        3709     3774      +65     
==========================================
+ Hits         1870     1912      +42     
- Misses       1577     1597      +20     
- Partials      262      265       +3     
Impacted Files Coverage Δ
core/circuitbreaker/rule_manager.go 73.07% <100.00%> (+1.07%) ⬆️
ext/datasource/helper.go 79.19% <100.00%> (-2.78%) ⬇️
core/circuitbreaker/slot.go 94.11% <0.00%> (-5.89%) ⬇️
core/hotspot/rule_manager.go 51.76% <0.00%> (-1.90%) ⬇️
core/flow/slot.go 43.33% <0.00%> (-1.50%) ⬇️
core/system/slot.go 53.06% <0.00%> (-1.11%) ⬇️
core/hotspot/slot.go 25.00% <0.00%> (-0.72%) ⬇️
core/isolation/slot.go 0.00% <0.00%> (ø)
core/base/slot_chain.go 97.70% <0.00%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 14fe759...162dc70. Read the comment docs.

@louyuting louyuting self-requested a review November 14, 2020 14:57
@louyuting louyuting added the area/circuit-breaking Issues or PRs related to circuit breaking label Nov 14, 2020
@louyuting louyuting added this to the 1.0.0 milestone Nov 14, 2020
@binbin0325 binbin0325 force-pushed the circuitbreaker_rule_cache branch from 3b9d70f to 162dc70 Compare November 15, 2020 12:11
sczyh30
sczyh30 previously approved these changes Nov 16, 2020
@louyuting louyuting merged commit 31ba124 into alibaba:master Nov 16, 2020
@louyuting louyuting changed the title Loading circuitbreaker rule supports cache Add cache mechanism for LoadRules in circuitbreaker module Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/circuit-breaking Issues or PRs related to circuit breaking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants