You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by he...@apache.org on 2022/07/02 07:56:44 UTC
[inlong] branch master updated: [INLONG-4834][Manager] After deleting the data_proxy cluster, the related nodes was not deleted (#4842)
This is an automated email from the ASF dual-hosted git repository.
healchow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 1df58255f [INLONG-4834][Manager] After deleting the data_proxy cluster, the related nodes was not deleted (#4842)
1df58255f is described below
commit 1df58255f3b48449025ca5272b36bb81c4544887
Author: ciscozhou <45...@users.noreply.github.com>
AuthorDate: Sat Jul 2 15:56:38 2022 +0800
[INLONG-4834][Manager] After deleting the data_proxy cluster, the related nodes was not deleted (#4842)
---
.../inlong/manager/service/cluster/InlongClusterServiceImpl.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/cluster/InlongClusterServiceImpl.java b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/cluster/InlongClusterServiceImpl.java
index 381b262b0..ac198a4b6 100644
--- a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/cluster/InlongClusterServiceImpl.java
+++ b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/cluster/InlongClusterServiceImpl.java
@@ -342,6 +342,13 @@ public class InlongClusterServiceImpl implements InlongClusterService {
return false;
}
+ List<InlongClusterNodeEntity> nodeEntities = clusterNodeMapper.selectByParentId(id);
+ if (CollectionUtils.isNotEmpty(nodeEntities)) {
+ String errMsg = String.format("there are undeleted nodes under the cluster [%s], "
+ + "please delete the node first", entity.getName());
+ throw new BusinessException(errMsg);
+ }
+
entity.setIsDeleted(entity.getId());
entity.setModifier(operator);
clusterMapper.updateById(entity);