Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ggbocoder committed Aug 21, 2024
1 parent 5368f94 commit fcdb316
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ public Result<String> createGroup(String namespace, String vGroup, String cluste
public Result<String> removeGroup(String namespace, String clusterName,String vGroup, String unitName) {
List<Cluster> clusterList = getClusterListByVgroup(vGroup, namespace);
for (Cluster cluster : clusterList) {
if (!StringUtils.equals(clusterName, cluster.getClusterName())) continue;
if (!StringUtils.equals(clusterName, cluster.getClusterName())) {
continue;
}
if (cluster.getUnitData() != null && cluster.getUnitData().size() > 0) {
Unit unit = cluster.getUnitData().get(0);
if (unit != null && unit.getNamingInstanceList() != null && unit.getNamingInstanceList().size() > 0) {
Expand Down Expand Up @@ -282,7 +284,7 @@ public boolean unregisterInstance(String namespace, String clusterName, String u
Object vgroupMap = node.getMetadata().get(CONSTANT_GROUP);
if (vgroupMap instanceof Map) {
((Map<String, Object>) vgroupMap).forEach((group, realUnitName) -> vGroupMap.get(group, k -> new ConcurrentHashMap<>())
.get(namespace).getCluster(clusterName).remove(realUnitName == null ? unitName : realUnitName));
.get(namespace).getCluster(clusterName).remove(realUnitName == null ? unitName : (String) realUnitName));
}
notifyClusterChange(namespace, clusterName, unitName, node.getTerm());
instanceLiveTable.remove(
Expand Down

0 comments on commit fcdb316

Please sign in to comment.