You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
by the way,问下哈。目前的熔断降级策略是每秒钟的异常比例不能超过阈值。 那么我怎么设置这个单位时间呢?
比如,我设置每分钟或者每30秒的异常的比例不超过阈值,超过则隔离。
我试着修改,com.alibaba.csp.sentinel.node.IntervalProperty的INTERVAL值,但是好像结果并不是我想要的。
能告知一下这个怎么做吗?
谢谢!
extends #109
你好!上次关于#109的这个bug,后来被整改了。
Bug描述
但是整改得并不正确.....经我测试,仅限于异常比例小于1的情况下正确。
但是当抛出的异常比例为100%时,设定的阈值小于1,此时会出现DegradeException,但是服务不会进入timeWindow被隔离。
举个栗子
同样以com.alibaba.csp.sentinel.demo.degrade.ExceptionRatioDegradeDemo这个Demo为例,直接设定每次都抛出异常,结果如下(不知怎么上传图片,直接copy过来了):
Connected to the target VM, address: '127.0.0.1:51393', transport: 'socket' begin to statistic!!! 1536131534343, oneSecondTotal:34, oneSecondPass:5, oneSecondBlock:29, oneSecondBizException:5 1536131535345, oneSecondTotal:49, oneSecondPass:5, oneSecondBlock:44, oneSecondBizException:5 1536131536345, oneSecondTotal:48, oneSecondPass:5, oneSecondBlock:43, oneSecondBizException:5 1536131537344, oneSecondTotal:48, oneSecondPass:5, oneSecondBlock:43, oneSecondBizException:5 1536131538346, oneSecondTotal:49, oneSecondPass:5, oneSecondBlock:44, oneSecondBizException:5 1536131539346, oneSecondTotal:48, oneSecondPass:5, oneSecondBlock:43, oneSecondBizException:5 1536131540346, oneSecondTotal:48, oneSecondPass:5, oneSecondBlock:43, oneSecondBizException:5 1536131541348, oneSecondTotal:49, oneSecondPass:5, oneSecondBlock:44, oneSecondBizException:5 1536131542348, oneSecondTotal:48, oneSecondPass:5, oneSecondBlock:43, oneSecondBizException:5
整改措施
问题还是出在:com.alibaba.csp.sentinel.slots.block.degrade.DegradeRule的passCheck方法中,在原来的Fixed处:commit 6799da2
不应该修改,还是应该保留原来的代码:
请确认...
The text was updated successfully, but these errors were encountered: