Sentinel icon indicating copy to clipboard operation
Sentinel copied to clipboard

feat: [ParamFlowRule]Add support for extracting param from complex object, when grade is RuleConstant.FLOW_GRADE_THREAD

Open AYue-94 opened this issue 4 years ago • 1 comments

Describe what this PR does / why we need it

When use ParamFlowRule, set grade to RuleConstant.FLOW_GRADE_THREAD, and use ParamFlowArgument as argument, it doesn't work. Add support for extracting param from complex object, when grade is RuleConstant.FLOW_GRADE_THREAD.

Does this pull request fix one issue?

https://github.com/alibaba/Sentinel/issues/2427

Describe how you did it

these two method takes ParamFlowArgument into account:

  1. com.alibaba.csp.sentinel.slots.block.flow.param.ParameterMetric#decreaseThreadCount
  2. com.alibaba.csp.sentinel.slots.block.flow.param.ParameterMetric#addThreadCount

Describe how to verify it

See com.alibaba.csp.sentinel.slots.block.flow.param.ParameterMetricTest#testAddAndDecreaseThreadCountForParamFlowArgument

Special notes for reviews

AYue-94 avatar Oct 26 '21 06:10 AYue-94

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


yuyue seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Oct 26 '21 06:10 CLAassistant

Due to this PR's inactivity and the unsigned CLA, we are temporarily closing it. Feel free to create a new PR if you still intend to contribute after addressing the CLA requirement.

LearningGp avatar Oct 16 '25 02:10 LearningGp