[Feature] For ParamFlowRule, add support for extracting param from complex object, when grade is RuleConstant.FLOW_GRADE_THREAD
- Dominant language
- Java
- Stars
- 23.1k
- Forks
- 8.1k
- PR merge metrics
- No merged PRs in 30d
Description
## Issue Description
Add support for extracting param from complex object, when grade is RuleConstant.FLOW_GRADE_THREAD.
### Describe what happened (or what feature you want)
When use ParamFlowRule, set grade to RuleConstant.FLOW_GRADE_THREAD, and use ParamFlowArgument as argument, it doesn't work.
### Describe what you expected to happen
these two method should take 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
### How to reproduce it (as minimally and precisely as possible)
1. set ParamFlowRule.grade = RuleConstant.FLOW_GRADE_THREAD;
2. use ParamFlowArgument as SphU.entry/exit's args;
### Tell us your environment
JDK8, Sentinel1.8.x
### Anything else we need to know?
Contributor guide
Research direction
Start at ParameterMetric#decreaseThreadCount and #addThreadCount, then trace how ParamFlowArgument is passed through SphU.entry/exit when ParamFlowRule.grade is FLOW_GRADE_THREAD. Confirm the existing behavior with a minimal JDK 8 reproduction using a complex argument; done means both methods account for the extracted parameter and thread-flow control works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100