healchow commented on code in PR #4135:
URL: https://github.com/apache/incubator-inlong/pull/4135#discussion_r867781827
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sink/StreamSinkServiceImpl.java:
##########
@@ -96,9 +102,19 @@ public Integer save(SinkRequest request, String operator) {
// Make sure that there is no sink info with the current groupId and
streamId
String streamId = request.getInlongStreamId();
String sinkType = request.getSinkType();
+ String sinkName = request.getSinkName();
List<StreamSinkEntity> sinkExist =
sinkMapper.selectByIdAndType(groupId, streamId, sinkType);
Preconditions.checkEmpty(sinkExist,
ErrorCodeEnum.SINK_ALREADY_EXISTS.getMessage());
+ // Check whether the sink and source have the same name under the same
groupId and streamId
+ List<StreamSourceEntity> sourceList =
sourceMapper.selectByRelatedId(groupId, streamId, sinkName);
Review Comment:
Why check the source in stream_sink 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]