alibaba / alibaba/Sentinel

RuleManager should throw out an exception for invalid rule

Open
#2,889 0 comments 0 reactions 0 assignees View on GitHub
kind/discussion
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

Such as https://github.com/alibaba/Sentinel/blob/master/sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/block/authority/AuthorityRuleManager.java

![图片](https://user-images.githubusercontent.com/42354711/192134905-a3d1cb9c-4242-4de2-87ad-b420ee82b7d2.png)

当我在配置中心枚举属性(比如,只能输入0或者1)输入成一个非法格式,应该报出异常信息,现在是无任何信息显示,并且会把原有已经生效的规则给清除掉

Contributor guide

Open the contributing guide

Research direction

Start with sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/block/authority/AuthorityRuleManager.java and trace how configuration-center rule updates handle invalid enum-like values. Reproduce the invalid input described in the issue; done means an exception is reported and previously effective rules are not cleared.

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
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.