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

[BUG] 关于热点参数不生效的讨论 #3453

Open
jasonpyf opened this issue Oct 12, 2024 · 1 comment
Open

[BUG] 关于热点参数不生效的讨论 #3453

jasonpyf opened this issue Oct 12, 2024 · 1 comment

Comments

@jasonpyf
Copy link

我在sentinel-dashboard配置了一个接口的热点规则但是没有生效,于是我就进行了DEBUG调试
我发现当一个接口被请求之后,首先进入的是一个SentinelWebInterceptor
image
SentinelWebInterceptor继承AbstractSentinelInterceptor抽象类,preHandle方法被调用
image
在这个方法中会调用SphU.entry方法
Entry entry = SphU.entry(resourceName, ResourceTypeConstants.COMMON_WEB, EntryType.IN);
但是SphU.entry没有传递当前接口请求的参数
image

在SphU.entry方法内部它传递的是一个默认常量OBJECTS0(对象数组,长度为0)
image

最终导致在ParamFlowSlot类中方法entry被调用的时候args是一个长度为0的对象数组
image

在ParamFlowChecker类中方法passCheck始终true
image

上面是我调试的结果

@jasonpyf
Copy link
Author

sentinel版本1.8.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant