Sentinel icon indicating copy to clipboard operation
Sentinel copied to clipboard

[Bug] Dashboard 流控规则——编辑单机阈值保存后,再次访问被流控的接口,单机阈值恢复成旧值

Open bobo612 opened this issue 7 years ago • 3 comments

Issue Description

Type: bug report or feature request

Describe what happened (or what feature you want)

流控规则页面,例如原先阈值=20,编辑单机阈值修改成100保存成功后,页面显示100,当请求触发限流约束的接口后,阈值从100变回20,单机阈值规则没有在客户端生效

Describe what you expected to happen

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

Anything else we need to know?

bobo612 avatar Dec 26 '18 13:12 bobo612

Hi, please check your log in ${user.home}/logs/csp/sentinel-record.log.xxx to check whether the service has received the correct rules. The FAQ may also be helpful for you.

sczyh30 avatar Dec 26 '18 14:12 sczyh30

image 1、先调用"http://localhost:8719/getRules?type=flow" 查询到"count":20.0,也就是预设值 2、页面上编辑count=120,推送到本地内存,再次查询发现count=120 3、URL触发正常接口 4、再次查询"http://localhost:8719/getRules?type=flow",发现count=20

本地sentinel-record.log.2018-12-27 2018-12-27 10:20:46 [FlowRuleManager] Flow rules received: {HelloWorld=[FlowRule{resource=HelloWorld, limitApp=default, grade=1, count=20.0, strategy=0, refResource=null, controlBehavior=0, warmUpPeriodSec=10, maxQueueingTimeMs=500, clusterMode=false, clusterConfig=null, controller=com.alibaba.csp.sentinel.slots.block.flow.controller.DefaultController@30ef9122}]} 2018-12-27 10:21:14 Receiving rule change (type: flow): [{"clusterMode":false,"controlBehavior":0,"count":120.0,"grade":1,"limitApp":"default","maxQueueingTimeMs":500,"resource":"HelloWorld","strategy":0,"warmUpPeriodSec":10}] 2018-12-27 10:21:14 [DynamicSentinelProperty] Config will be updated to: [FlowRule{resource=HelloWorld, limitApp=default, grade=1, count=120.0, strategy=0, refResource=null, controlBehavior=0, warmUpPeriodSec=10, maxQueueingTimeMs=500, clusterMode=false, clusterConfig=null, controller=null}] 2018-12-27 10:21:14 [FlowRuleManager] Flow rules received: {HelloWorld=[FlowRule{resource=HelloWorld, limitApp=default, grade=1, count=120.0, strategy=0, refResource=null, controlBehavior=0, warmUpPeriodSec=10, maxQueueingTimeMs=500, clusterMode=false, clusterConfig=null, controller=com.alibaba.csp.sentinel.slots.block.flow.controller.DefaultController@1b3dee38}]} 2018-12-27 10:21:35 [DynamicSentinelProperty] Config will be updated to: [FlowRule{resource=HelloWorld, limitApp=default, grade=1, count=20.0, strategy=0, refResource=null, controlBehavior=0, warmUpPeriodSec=10, maxQueueingTimeMs=500, clusterMode=false, clusterConfig=null, controller=null}] 2018-12-27 10:21:35 [FlowRuleManager] Flow rules received: {HelloWorld=[FlowRule{resource=HelloWorld, limitApp=default, grade=1, count=20.0, strategy=0, refResource=null, controlBehavior=0, warmUpPeriodSec=10, maxQueueingTimeMs=500, clusterMode=false, clusterConfig=null, controller=com.alibaba.csp.sentinel.slots.block.flow.controller.DefaultController@217efcc5}]}

bobo612 avatar Dec 27 '18 02:12 bobo612

Please check the logic in your controller and find whether it modified the rules.


请检查应用端 /user/test API 内的逻辑,看看是否有修改过规则。

sczyh30 avatar Dec 27 '18 03:12 sczyh30