Open ddfeiyu opened 1 year ago
之前有个 NPE 的问题应该在 https://github.com/alibaba/Sentinel/pull/2980 修复过,可以测试下 master 最新的有没有问题
@sczyh30 经测试,报错在LogSlot的41行代码 e.getRule().getId() 处,即e.getRule()为空。
是因为SystemSlot检测类即SystemRuleManager抛出的异常中没有 rule对象,导致LogSlot处rule为空
throw new SystemBlockException(resourceWrapper.getName(), "qps");
建议: 将SystemRule封装进SystemBlockException,和其他BlockException保持一致 throw new SystemBlockException(resourceWrapper.getName(), SystemRule);
Would you like to contribute a PR to improve it?
Issue Description
Type: bug report or feature request
[bug report] dubbo接口 SystemSlot 检测没通过,但是在LogSlot 发生NullPointerException, 导致没有收到 BlockedException
Describe what happened (or what feature you want)
Sentinel版本号: 2.0.0-SNAPSHOT
SystemSlot限流检测时满足条件时抛出异常 throw new SystemBlockException(resourceWrapper.getName(), "qps");
但是在 LogSlot 发生NullPointerException,导致SentinelDubboProviderFilter 没有捕获到 BlockException
异常堆栈