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

The Bug:The method isValidRule(GatewayFlowRule rule) in GatewayRuleManager.class has a invalid check. #2595

Closed
rabbitloveLHF opened this issue Mar 10, 2022 · 1 comment · Fixed by #2609
Labels
area/gateway-flow-control Issues or PRs related to API gateway flow control good first issue Good for newcomers kind/bug Category issues or prs related to bug.

Comments

@rabbitloveLHF
Copy link

Type: Bug Report
The method isValidRule(GatewayFlowRule rule) in GatewayRuleManager.class has a invalid check.
ControlBehavior should be checked here, not grade.

public static boolean isValidRule(GatewayFlowRule rule) {
    if (rule.getGrade() == RuleConstant.CONTROL_BEHAVIOR_RATE_LIMITER
            && rule.getMaxQueueingTimeoutMs() < 0) {
        return false;
    }
}

The sentinel version is 1.8.1

@sczyh30
Copy link
Member

sczyh30 commented Mar 11, 2022

Could you please contribute a PR to fix it?

@sczyh30 sczyh30 added area/gateway-flow-control Issues or PRs related to API gateway flow control kind/bug Category issues or prs related to bug. good first issue Good for newcomers labels Mar 11, 2022
DollarB added a commit to DollarB/Sentinel that referenced this issue Mar 18, 2022
…check. ControlBehavior should be checked here, not grade. (alibaba#2595)
DollarB added a commit to DollarB/Sentinel that referenced this issue Mar 18, 2022
…check. ControlBehavior should be checked here, not grade. (alibaba#2595)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gateway-flow-control Issues or PRs related to API gateway flow control good first issue Good for newcomers kind/bug Category issues or prs related to bug.
Projects
None yet
2 participants