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

sentinel1.8 使用Nacos做动态存储的时候首次更新GatewayRule会出现nullpointexception #1981

Closed
gjie1991 opened this issue Jan 23, 2021 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@gjie1991
Copy link

GatewayRuleManager.java
230行
ParameterMetricStorage.getParamMetricForResource(resource).clearForRule(rule);

加载规则时,首次调用当前方法值为null
ParameterMetricStorage.getParamMetricForResource(resource) == null ?

@gjie1991 gjie1991 changed the title 使用Nacos做动态存储的时候首次更新GatewayRule会出现nullpointexception sentinel1.8 使用Nacos做动态存储的时候首次更新GatewayRule会出现nullpointexception Jan 23, 2021
@gjie1991
Copy link
Author

ParameterMetric parameterMetric = ParameterMetricStorage.getParamMetricForResource(resource);
if (parameterMetric != null) {
parameterMetric.clearForRule(rule);
}

@sczyh30 sczyh30 added the duplicate This issue or pull request already exists label Jan 24, 2021
@sczyh30
Copy link
Member

sczyh30 commented Jan 24, 2021

Hi, this is a known bug and has been fixed in #1901 (which will be released with 1.8.1).

@sczyh30 sczyh30 closed this as completed Jan 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants