This is an automated email from the ASF dual-hosted git repository.
vernedeng 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 663a1fe97b [INLONG-11751][Manager] Modify doDeleteCheck method verify
(#11758)
663a1fe97b is described below
commit 663a1fe97bcbc7b4a392523784a5f6aae0d104f9
Author: James Zow <[email protected]>
AuthorDate: Wed Feb 19 09:40:23 2025 +0800
[INLONG-11751][Manager] Modify doDeleteCheck method verify (#11758)
* [INLONG-11751][Manager] Modify doDeleteCheck method verify
* [INLONG-11751][Manager] Modify doDeleteCheck method verify
* Change to use constant instead of enum
Apply suggestions from code review
Co-authored-by: fuweng11 <[email protected]>
* Delete GroupMode enum import
* [INLONG-11751][Manager] Fix code format
* [INLONG-11751][Manager] Remove unused enum
* Update
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java
---------
Co-authored-by: James Zow <[email protected]>
Co-authored-by: fuweng11 <[email protected]>
Co-authored-by: Charles Zhang <[email protected]>
---
.../apache/inlong/manager/service/group/InlongGroupServiceImpl.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java
index 66abc58937..d75929aff7 100644
---
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java
+++
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java
@@ -648,9 +648,11 @@ public class InlongGroupServiceImpl implements
InlongGroupService {
String.format("current group status=%s was not allowed to
delete", curState));
}
- // If the status not allowed deleting directly, you need to delete the
related "inlong_stream" first,
+ // If the status does not allow deleting directly, and the group mode
is STANDARD,
+ // you need to delete the related "inlong_stream" first.
// otherwise, all associated info will be logically deleted.
- if (GroupStatus.deleteStreamFirst(curState)) {
+ if (GroupStatus.deleteStreamFirst(curState)
+ &&
InlongConstants.STANDARD_MODE.equals(groupInfo.getInlongGroupMode())) {
int count = streamService.selectCountByGroupId(groupId);
if (count >= 1) {
throw new
BusinessException(ErrorCodeEnum.GROUP_DELETE_HAS_STREAM,