提交 dcdef6a3 编写于 作者: H haocao

Add orchestration master slave datasource disabled support 4th.

上级 b7537d29
......@@ -212,7 +212,6 @@ public final class ConfigurationService {
for (String each : dataSources) {
String dataSourceName = each.substring(each.lastIndexOf("/") + 1);
String path = dataSourcesNodePath + "/" + each;
System.out.println(path);
if (StateNodeStatus.DISABLED.toString().equalsIgnoreCase(regCenter.get(path)) && dataSourceMap.containsKey(dataSourceName)) {
dataSourceMap.remove(dataSourceName);
ruleConfig.getSlaveDataSourceNames().remove(dataSourceName);
......
......@@ -72,7 +72,7 @@ public final class DataSourceService {
}
if (TreeCacheEvent.Type.NODE_UPDATED == event.getType() || TreeCacheEvent.Type.NODE_REMOVED == event.getType()) {
MasterSlaveRule masterSlaveRule = configurationService.getAvailableMasterSlaveRule();
if (TreeCacheEvent.Type.NODE_REMOVED == event.getType()) {
if (TreeCacheEvent.Type.NODE_UPDATED == event.getType()) {
String path = childData.getPath();
String dataSourceName = path.substring(path.lastIndexOf("/") + 1);
masterSlaveRule.getSlaveDataSourceMap().remove(dataSourceName);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册