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

Support prioritized entry in ProcessorSlot interface #255

Merged
merged 3 commits into from
Nov 21, 2018

Conversation

sczyh30
Copy link
Member

@sczyh30 sczyh30 commented Nov 19, 2018

Describe what this PR does / why we need it

Support prioritized entry in ProcessorSlot interface so that each slot can handle requests with priority.

Does this pull request fix one issue?

Related to #207

Describe how you did it

  • Refactor ProcessorSlot interface (add a parameter prioritized in entry-related methods)
  • Add entryWithPriority methods in SphU (separate from entry method so that it won't be confused with previous entry with args)

Describe how to verify it

This is only a change for interface. Run all test cases to ensure nothing broken.

Special notes for reviews

NONE

- Add `entryWithPriority` in SphU

Signed-off-by: Eric Zhao <[email protected]>
@sczyh30 sczyh30 added the to-review To review label Nov 19, 2018
@codecov-io
Copy link

codecov-io commented Nov 20, 2018

Codecov Report

Merging #255 into master will increase coverage by 0.63%.
The diff coverage is 81.81%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #255      +/-   ##
============================================
+ Coverage     51.78%   52.42%   +0.63%     
- Complexity      894      903       +9     
============================================
  Files           150      150              
  Lines          5030     5036       +6     
  Branches        723      723              
============================================
+ Hits           2605     2640      +35     
+ Misses         2110     2077      -33     
- Partials        315      319       +4
Impacted Files Coverage Δ Complexity Δ
...e/src/main/java/com/alibaba/csp/sentinel/SphU.java 70.58% <0%> (-9.42%) 12 <0> (ø)
.../sentinel/slots/nodeselector/NodeSelectorSlot.java 94.73% <100%> (ø) 4 <0> (ø) ⬇️
...com/alibaba/csp/sentinel/slots/logger/LogSlot.java 73.33% <100%> (ø) 3 <1> (ø) ⬇️
.../csp/sentinel/slots/block/degrade/DegradeSlot.java 100% <100%> (ø) 3 <0> (ø) ⬇️
...entinel/slotchain/AbstractLinkedProcessorSlot.java 92.85% <100%> (ø) 7 <0> (ø) ⬇️
...sentinel/slots/block/flow/param/ParamFlowSlot.java 76.78% <100%> (ø) 18 <0> (ø) ⬇️
...tinel/slots/clusterbuilder/ClusterBuilderSlot.java 71.42% <100%> (ø) 8 <0> (ø) ⬇️
...ba/csp/sentinel/slots/statistic/StatisticSlot.java 61.11% <100%> (ø) 10 <4> (ø) ⬇️
.../alibaba/csp/sentinel/slots/system/SystemSlot.java 100% <100%> (ø) 3 <0> (ø) ⬇️
.../sentinel/slots/block/authority/AuthoritySlot.java 88.23% <100%> (ø) 7 <0> (ø) ⬇️
... and 6 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 f2a401c...095b4ee. Read the comment docs.

Copy link
Contributor

@CarpenterLee CarpenterLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sczyh30 sczyh30 merged commit 2237727 into master Nov 21, 2018
@sczyh30 sczyh30 removed the to-review To review label Nov 21, 2018
@sczyh30 sczyh30 deleted the feature/prioritized-entry-interface branch November 21, 2018 08:32
@sczyh30 sczyh30 added this to the 1.4.0 milestone Nov 30, 2018
Arlmls pushed a commit to Arlmls/Sentinel that referenced this pull request Jan 8, 2019
- Refactor the slot interface to support prioritized entry
- Add `entryWithPriority` in SphU

Signed-off-by: Eric Zhao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants