This is an automated email from the ASF dual-hosted git repository.

zhongjiajie pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 96041e3876 fix invalid registry path ends with 'master' or 'worker' 
(#14328)
96041e3876 is described below

commit 96041e38766d1eb391812150fa15adc806ba2d4c
Author: Zinway <[email protected]>
AuthorDate: Fri Sep 1 15:11:49 2023 +0800

    fix invalid registry path ends with 'master' or 'worker' (#14328)
    
    Co-authored-by: Zinway Liu <[email protected]>
    Co-authored-by: Aaron Wang <[email protected]>
---
 .../java/org/apache/dolphinscheduler/registry/api/RegistryClient.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/RegistryClient.java
 
b/dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/RegistryClient.java
index ddd80d94a1..f690b6800f 100644
--- 
a/dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/RegistryClient.java
+++ 
b/dolphinscheduler-registry/dolphinscheduler-registry-api/src/main/java/org/apache/dolphinscheduler/registry/api/RegistryClient.java
@@ -210,11 +210,11 @@ public class RegistryClient {
     }
 
     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) {

Reply via email to