alibaba / alibaba/Sentinel

[BUG] NPE causes SystemRule cannot effect

Open
#3,336 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

## Issue Description

Type: *bug report*

### Describe what happened
版本: V1.8.6
由于系统规则抛出时是直接抛出,没有包裹 `Rule` 对象。而在 `LogSlot` 记录日志时,会去获取 `Rule` 对象,导致此处出现 `NPE` ,使得 `SystemBlockException` 没有抛出被吞掉,使得系统规则失效。
![image](https://github.com/alibaba/Sentinel/assets/83362909/de883b8d-1cc1-4198-a2d7-1985fbbddfbe)
下图是发生 `NPE` 时,导致 `SystemBlockException` 被吞掉的情况,其他限流规则是否会被吞掉,还待测试。
1a5772737097e46e3c2802fc46640a1

### Describe what you expected to happen
不应该出现 `NPE` 导致规则失效

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

1.
2.
3.

### Tell us your environment

### Anything else we need to know?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.