-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Milestone
Description
BUG REPORT
- Please describe the issue you observed:
- What did you do (The steps to reproduce)?
- call updateAccessConfig to update acl
- do acl validation using the new acl
-
What did you expect to see?
-
What did you see instead?
see the error:
java.lang.NullPointerException
at org.apache.rocketmq.acl.plain.PlainPermissionManager.validate(PlainPermissionManager.java:646)
at org.apache.rocketmq.acl.plain.PlainAccessValidator.validate(PlainAccessValidator.java:141)
at org.apache.rocketmq.acl.plain.PlainAccessValidatorTest.testValidateAfterUpdateAccessConfig(PlainAccessValidatorTest.java:942)
-
Please tell us about your environment:
-
Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
after update acl, the file watcher will call load() function, the plainAccessResourceMap will not put new acl because the conditionthis.accessKeyTable.get(plainAccessResource.getAccessKey())
is not null
if (this.accessKeyTable.get(plainAccessResource.getAccessKey()) == null) {
plainAccessResourceMap.put(plainAccessResource.getAccessKey(), plainAccessResource);
this.accessKeyTable.put(plainAccessResource.getAccessKey(), aclFilePath);
}