healchow commented on code in PR #6489: URL: https://github.com/apache/inlong/pull/6489#discussion_r1018700988
########## inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/StreamSourceServiceImpl.java: ########## @@ -267,6 +267,20 @@ public Boolean delete(Integer id, String operator) { return true; } + @Override + public Boolean forceDelete(String groupId, String streamId, String operator) { + LOGGER.info("begin to force delete source for groupId={} and streamId={} by user={}", + groupId, streamId, operator); + Preconditions.checkNotNull(groupId, ErrorCodeEnum.GROUP_ID_IS_EMPTY.getMessage()); + Preconditions.checkNotNull(streamId, ErrorCodeEnum.STREAM_ID_IS_EMPTY.getMessage()); + + int sourceCount = sourceMapper.updateByRelatedId(groupId, streamId, SourceStatus.SOURCE_DISABLE.getCode()); + int fieldCount = sourceFieldMapper.deleteByRelatedId(groupId, streamId); + LOGGER.info("success to force delete source for groupId={} and streamId={} by user={}, update {} sources and delete {} fields", + groupId, streamId, operator, sourceCount, fieldCount); Review Comment: ```suggestion LOGGER.info("success to force delete source for groupId={} and streamId={} by user={}, update {} sources and {} fields", groupId, streamId, operator, sourceCount, fieldCount); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@inlong.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org