Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -668,15 +668,6 @@ public Boolean delete(String groupId, String operator) {
streamService.logicDeleteAll(groupId, operator);
}

entity.setIsDeleted(entity.getId());
entity.setStatus(GroupStatus.CONFIG_DELETED.getCode());
entity.setModifier(operator);
int rowCount = groupMapper.updateByIdentifierSelective(entity);
if (rowCount != InlongConstants.AFFECTED_ONE_ROW) {
LOGGER.error("inlong group has already updated for groupId={} curVersion={}", groupId, entity.getVersion());
throw new BusinessException(ErrorCodeEnum.CONFIG_EXPIRED);
}

// logically delete the associated extension info
groupExtMapper.logicDeleteAllByGroupId(groupId);

Expand All @@ -689,6 +680,14 @@ public Boolean delete(String groupId, String operator) {
}
}

entity.setIsDeleted(entity.getId());
entity.setModifier(operator);
int rowCount = groupMapper.updateByIdentifierSelective(entity);
if (rowCount != InlongConstants.AFFECTED_ONE_ROW) {
LOGGER.error("inlong group has already updated for groupId={} curVersion={}", groupId, entity.getVersion());
throw new BusinessException(ErrorCodeEnum.CONFIG_EXPIRED);
}

LOGGER.info("success to delete group and group ext property for groupId={} by user={}", groupId, operator);
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public ListenerResult listen(WorkflowContext context) {
break;
case DELETE:
// delete process completed, then delete the group info
groupService.updateStatus(groupId, GroupStatus.CONFIG_DELETED.getCode(), operator);
groupService.delete(groupId, operator);
break;
default:
Expand Down
Loading