healchow commented on code in PR #4135:
URL: https://github.com/apache/incubator-inlong/pull/4135#discussion_r867783208
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/StreamSourceServiceImpl.java:
##########
@@ -75,8 +81,19 @@ public Integer save(SourceRequest request, String operator) {
// Check if it can be added
String groupId = request.getInlongGroupId();
+ String streamId = request.getInlongStreamId();
+ String sourceName = request.getSourceName();
InlongGroupEntity groupEntity =
commonOperateService.checkGroupStatus(groupId, operator);
+ // Check whether the sink and source have the same name under the same
groupId and streamId
+ List<StreamSinkEntity> sinkExistList =
sinkMapper.selectByRelatedId(groupId, streamId);
+ for (StreamSinkEntity sinkEntity : sinkExistList) {
+ if (sinkEntity != null && Objects.equals(sinkEntity.getSinkName(),
sourceName)) {
Review Comment:
Why check the sink name in the stream_source table?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]