Skip to content

Commit

Permalink
fix invalid registry path ends with 'master' or 'worker' (#14328)
Browse files Browse the repository at this point in the history
Co-authored-by: Zinway Liu <zinway.liu@ucloud.cn>
Co-authored-by: Aaron Wang <wangweirao16@gmail.com>
  • Loading branch information
3 people authored Sep 1, 2023
1 parent 7640c29 commit 96041e3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@ public IStoppable getStoppable() {
}

public boolean isMasterPath(String path) {
return path != null && path.startsWith(RegistryNodeType.MASTER.getRegistryPath());
return path != null && path.startsWith(RegistryNodeType.MASTER.getRegistryPath() + Constants.SINGLE_SLASH);
}

public boolean isWorkerPath(String path) {
return path != null && path.startsWith(RegistryNodeType.WORKER.getRegistryPath());
return path != null && path.startsWith(RegistryNodeType.WORKER.getRegistryPath() + Constants.SINGLE_SLASH);
}

public Collection<String> getChildrenKeys(final String key) {
Expand Down

0 comments on commit 96041e3

Please sign in to comment.