This is an automated email from the ASF dual-hosted git repository.
kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new a3153b5 [Bug][Master] Fix First master fault tolerance when startup
(#5045)
a3153b5 is described below
commit a3153b5e44d40cceea6e705f2406c4a4ec5f99c9
Author: guohaozhang <[email protected]>
AuthorDate: Sat Mar 13 00:01:18 2021 +0800
[Bug][Master] Fix First master fault tolerance when startup (#5045)
* [Fix-#5044] Fix First master fault tolerance when startup
* [Fix-#5044] Fix spell error
---
.../java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java
index cf8e23f..e813cdf 100644
---
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java
+++
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java
@@ -85,8 +85,8 @@ public class ZKMasterClient extends AbstractZKClient {
// master registry
masterRegistry.registry();
masterRegistry.getZookeeperRegistryCenter().setStoppable(masterServer);
- String registPath = this.masterRegistry.getMasterPath();
-
masterRegistry.getZookeeperRegistryCenter().getRegisterOperator().handleDeadServer(registPath,
ZKNodeType.MASTER, Constants.DELETE_ZK_OP);
+ String registryPath = this.masterRegistry.getMasterPath();
+
masterRegistry.getZookeeperRegistryCenter().getRegisterOperator().handleDeadServer(registryPath,
ZKNodeType.MASTER, Constants.DELETE_ZK_OP);
// init system znode
this.initSystemZNode();
@@ -178,9 +178,6 @@ public class ZKMasterClient extends AbstractZKClient {
* @throws Exception exception
*/
private void failoverServerWhenDown(String serverHost, ZKNodeType
zkNodeType) throws Exception {
- if (StringUtils.isEmpty(serverHost)) {
- return;
- }
switch (zkNodeType) {
case MASTER:
failoverMaster(serverHost);