Use degraderule and add exception rate equals 1.0,it's invalid
- Dominant language
- Java
- Stars
- 23.1k
- Forks
- 8.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Type:bug report
When use degraderule,add exception rate equals 1.0,it's invalid。
And when I view the source code,it's:
**double curCount = errCount;
if (strategy == DEGRADE_GRADE_EXCEPTION_RATIO) {
// Use errorRatio
curCount = errCount * 1.0d / totalCount;
}
if (curCount > threshold) {
transformToOpen(curCount);
}
}**
so it will not greater than 1,and the value [0.0-1.0] make any means?
2、use jdk1.8,sentinel 1.8.0,windows10
Contributor guide
Research direction
Start by tracing the degraderule exception-ratio path shown in the issue, including the calculation of curCount and the threshold comparison. Reproduce the behavior with JDK 1.8 and Sentinel 1.8.0 using an exception rate of 1.0, then verify the intended [0.0-1.0] threshold semantics and add coverage for the clarified behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100