You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/04/08 23:05:24 UTC
[GitHub] [dolphinscheduler] huagetai commented on a diff in pull request #9281: [Improvement-9263][master]Implement optimize failover
huagetai commented on code in PR #9281:
URL: https://github.com/apache/dolphinscheduler/pull/9281#discussion_r846532276
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistryClient.java:
##########
@@ -158,10 +154,7 @@ public void removeMasterNodePath(String path, NodeType nodeType, boolean failove
return;
}
- String failoverPath = getFailoverLockPath(nodeType, serverHost);
Review Comment:
The lock is moved to the failoverMasterWithLock method of FailoverService.
```java
private void failoverMasterWithLock(String masterHost) {
String failoverPath = getFailoverLockPath(NodeType.MASTER, masterHost);
try {
registryClient.getLock(failoverPath);
this.failoverMaster(masterHost);
} catch (Exception e) {
LOGGER.error("{} server failover failed, host:{}", NodeType.MASTER, masterHost, e);
} finally {
registryClient.releaseLock(failoverPath);
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org